TyOverby / ares

A Lisp made for easy integration with Rust.
9 stars 1 forks source link

Add an option varient to value #31

Closed TyOverby closed 8 years ago

bwo commented 9 years ago

I think both a matching macro and something like haskell's maybe would be very useful for this. (maybe is basically fold for options).

TyOverby commented 9 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?

TyOverby commented 9 years ago

I kindof address the "functions that work on multiple types" thing in #34.