You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Go has first class functions and duck type interfaces.
It would be handy to have functional interfaces for easily passing a function as a parameter to another function that expects an interface with has only one function definition.
Example:
typeSomeinterface {
SomeFunc(paramint) int
}
funcTest(sSome) {
...
}
f:=func(aint) int {
...
}
Test(f)
WDYT about it?
The text was updated successfully, but these errors were encountered:
Currently Go has first class functions and duck type interfaces.
It would be handy to have functional interfaces for easily passing a function as a parameter to another function that expects an interface with has only one function definition.
Example:
WDYT about it?
The text was updated successfully, but these errors were encountered: