Comment
Comment by grey-area
Not sure what this has to do with generics, Go requires types for function arguments. If your anonymous function gets clumsy and too big in place, just use a named function not an anonymous one:
https://play.golang.org/p/3sNOeVIhqi