;; also known as bind
;; it's more convenient to have the function in last arg position
(bind-func flatmap:[Option{!b}*,Option{!a}*,[Option{!b}*,!a]*]*
(lambda (M f)
;; (join (fmap f M)))) ;; alternate using join & fmap
(Some$ M (x) (f x) (None))))