(enum Maybe
(Just x)
Nothing)(def foo (Just 99))
(def bar Nothing)and_then :: (Any a) => Maybe a -> Lambda -> Maybe Value
Performs a lambda with the contained value of Just.
optionnal :: Maybe a: The value to process.callback :: Lambda: The callback to use.
(def foo (Just 99))
(and_then foo (λ (x) (Just (+ x 1)))) ;; (Just 100)
(def bar Nothing)
(and_then bar (λ (x) (Just (- x 1)))) ;; Nothing