any   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/adt.xtm

Implementation

(bind-func any:[bool,[bool,!a]*,List{!a}*]*
  (lambda (pred lst)
    (let ((f (lambda (l)
               (if (null? l)
                   #f
                   (if (pred (car l))
                       #t
                       (f (cdr l)))))))
      (f lst))))


Back to Index

Similar Entries