fmap   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm

Implementation

;; also known as map, lift
(bind-func fmap:[Option{!b}*,[!b,!a]*,Option{!a}*]*
  (lambda (f F)
    (Some$ F (x) (Some (f x)) (None))))


Back to Index

Similar Entries