- take-while pred clistprocedure
- take-while! pred clistprocedure
Returns the longest initial prefix of CLIST whose elements all satisfy the predicate PRED.
Take-while! is the linear-update variant. It is allowed, but not required, to alter the argument list to produce the result.
(take-while even? '(2 18 3 10 22 9)) => (2 18)