5 ms·
To add, here's a nice article on implementing map from scratch: https://blog.burntsushi.net/type-parametric-functions-golang/ https://blog.burntsushi.net/type-p
by imode 7y ago
To add, here's a nice article on implementing map from scratch: https://blog.burntsushi.net/type-parametric-functions-golang/ https://blog.burntsushi.net/type-parametric-functions-golang...
It illustrates what you have to pay to get this kind of functionality for arbitrary slices.
I wonder how this would change with generics.