apply   xtlang


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

Implementation

;; also known as <*> or ap
(bind-func apply:[ADOption{!b}*,ADOption{[!b,!a]*}*,ADOption{!a}*]*
  (lambda (F1 F2)
    (ADSome$ F1 (f)
              (ADSome$ F2 (x)
                        (ADSome (f x))
                        (ADNone))
              (ADNone))))


Back to Index

Similar Entries