4 ms·
100% that's a big part of it (although there are others). Although if someone doesn't know haskell, then the above notation for functions getting the first ele
by BoiledCabbage 7y ago
100% that's a big part of it (although there are others).
Although if someone doesn't know haskell, then the above notation for functions getting the first element of a list is probably not of much value to them.
Clearer would be:
char head(List<char> x);
char? saferHead(List<char> x);
char safeHead(NonEmptyList<char> x);