|
|
|
|
|
by Groxx
1652 days ago
|
|
Without generics this is func (o IntToStringOption) Map(f func(a int) string) IntToStringOption { ... }
// ... but that has to be repeated dozens of times
tbh I don't see it as much different. The func argument is the most complex part of the whole thing. And much of the readability comes from not using single-char type names, but you do learn to see past that with time. |
|