Closed TyOverby closed 8 years ago
Yeah, we need lots more utility functions in this module.
What are your thoughts about functions that can work in theory on multiple types?
map
should map over lists and options
flatmap
should work over lists and options
foreach
should iterate over both as well
I guess this really brings up the question of how to we are going to add extension methods. What if someone has their own user defined type and they want map
to work on that?
I kindof address the "functions that work on multiple types" thing in #34.
I think both a matching macro and something like haskell's
maybe
would be very useful for this. (maybe
is basicallyfold
for options).