monads.maybe

Represents values that might by empty (i.e., nil).

maybe

(maybe default f m)
If the value is nil return default, otherwise call f on the
maybe value.

maybe->

macro

(maybe-> bindings then)(maybe-> bindings then else)
Takes a vector of bindings and a final body. Terminates
execution when the first nil value is encountered,
otherwise returns the then value.  Optionally, pass an
else value that will be returned if a nil value is encountered
in the bindings.

maybe->either

(maybe->either default m)
If the maybe value is nil return default wrapped in Err,
otherwise return the value wrapped in Ok.

try-maybe

macro

(try-maybe body)
Execute body within a try/catch block. Returns the
body if no exception is thrown, otherwise nil.