chickadee » ck-macros » c-find-tail

(c-find-tail '(OP ...) L) → pair 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 the tail of the list starting with that item. Yields '#f if no item passes the predicate.

Analogous to find-tail from SRFI 1.

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