chickadee » ck-macros » c-find

(c-find '(OP ...) L) → item or '#fsyntax

Searches the list for the first item that passes the predicate operation (i.e. the predicate yields a non-'#f value), then yields that item. Yields '#f if no item passes the predicate.

Analogous to find from SRFI-1.

(ck () (c-quote (c-find '(c-pair?)
                        '(a (b . c) 1 (d e) #t))))
;; ==> '(b . c)