member   xtlang


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

Implementation

(bind-func member:[List{!a}*,!a,List{!a}*]*
  (lambda (element lst)
    (let ((f (lambda (l)
               (if (null? l)
                   null
                   (if (equal element (car l))
                       l
                       (f (cdr l)))))))
      (f lst))))


Back to Index

Similar Entries

  • cl:member-if    scheme
  • generic-member    scheme
  • member    scheme
  • member    xtlang
  • tree-member    scheme