-of Kaplan's Plexy). It turns out that there is a natural monad for
-the Option type. Borrowing the notation of OCaml, let's say that "`'a
-option`" is the type of a boxed `'a`, whatever type `'a` is. Then the
-obvious singleton for the Option monad is \p.Just p. What is the
-composition operator >=> for the Option monad? Show your answer is
-correct by proving that it obeys the monad laws.
+of Kaplan's Plexy). As we learned in class, there is a natural monad
+for the Option type. Borrowing the notation of OCaml, let's say that
+"`'a option`" is the type of a boxed `'a`, whatever type `'a` is.
+More specifically,
+
+ 'a option = Nothing | Just 'a
+
+Then the obvious singleton for the Option monad is \p.Just p. Give
+(or reconstruct) the composition operator >=> we discussed in class.
+Show your composition operator obeys the monad laws.
+
+2. Do the same with lists. That is, given an arbitrary type
+'a, let the boxed type be ['a], i.e., a list of objects of type 'a. The singleton
+is `\p.[p]`, and the composition operator is
+
+ >=> (first:P->[Q]) (second:Q->[R]) :(P->[R]) = List.flatten (List.map f (g a))
+
+For example:
+
+ f p = [p, p+1]
+ s q = [q*q, q+q]
+ >=> f s 7 = [49, 14, 64, 16]
+