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