▲ | dkarl 3 days ago | |
The language might permit it now, but it isn't designed for it. I think if the Go designers had intended for map, filter, et al to replace most for loops, they would have designed a more concise syntax for anonymous functions. Something more along the lines of:
Instead of
which as best as I can tell is how you'd express the same thing in Go if you had a container type with Map and Filter defined. |