fmap   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm

Implementation

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


Back to Index

Similar Entries