Advertisement
clairec

Untitled

Jul 10th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.16 KB | None | 0 0
  1. (defun take-while (list pred)
  2.   (if (null list) ()
  3.     (let ((x (car list)))
  4.       (if (pred x)
  5.         (cons x (take-while (cdr list) pred))
  6.         ()))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement