4 ms·
Updated to generalise a bit more. If this ever came up in code review, I'd probably facepalm pretty hard. http://play.golang.org/p/YUQSZgFx_b http://play.golan
by paddyforan 14y ago
Updated to generalise a bit more. If this ever came up in code review, I'd probably facepalm pretty hard.
http://play.golang.org/p/YUQSZgFx_b http://play.golang.org/p/YUQSZgFx_b
- jbooth 14y agoHa. Yeah, the map() and reject() function defs are fine but the actual usage is a little eye-bleed inducing :)
- paddyforan 14y agoSo now that we've established Ruby is better at being Ruby than Go is, I wonder if there's an actual use case for this kind of thing, so I can demonstrate the "Go way" of handling it...