Recitation 16
-
Why could it be advantageous to use the maybe monad (vs. using pattern matching on the
option
type)? -
It turns out that one can encode non-deterministic computations using a monad? We let
t
be a set that encodes all possible results. Thereturn
function produces a singleton set containing its argument. What shouldbind
do? (No need to give code – it’s fine to be informal.)