The interface construct in Go works very different from the interface construct in Java. And I did explain the differences. Please don't assume because you know how `interface` in java works, you know how `interface` in go works. I will add a note in my original post, so further people who read this do not make the same wrong assumtion as you did.
Can you tell me why your `foobar` in your functional solution has a function as argument, instead of just passing it an `int` directly? Remember in functional programming functions may not have side effects.