apply   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/base/prelude.xtm

Implementation

;; also known as 'ap' or '<*>'
(bind-func apply:[List{!b}*,List{[!b,!a]*}*,List{!a}*]*
  (lambda (F1 F2)
    (Cons$ F1 (f fs)
              (Cons$ F2 (x xs)
                        (Cons (f x) (apply fs xs))
                        (Nil))
              (Nil))))


Back to Index

Similar Entries