;; also known as 'bind' (bind-func flatmap:[List{!b}*,List{!a}*,[List{!b}*,!a]*]* (lambda (M f) ;; alternate implementation using join and fmap ;; (join (fmap f M)))) (Cons$ M (x xs) (append (f x) (flatmap xs f)) (Nil))))