These exercises were part of a LambdaConf Outpost meetup. You may find the instructions here.
-
Develop a model for boolean values (
Bool
), which may be either true or false.Think: Do you need an if-then-else construct? Why or why not?
Bonus: Develop a model for eithers (
Either
), whih can be one thing ("left") or another ("right"), and model a boolean as a partitioning of a set into two disjoint sets. -
Develop a model for optional values (
Maybe
/Option
), which are containers that are either empty ("nothing" / "none") or hold a single value ("just" / "some").