Sha256: 9d997753c32f7c5bfee49bf3b01ffd64f89ace276a978c8ce6210dad7a943002
Contents?: true
Size: 410 Bytes
Versions: 396
Compression:
Stored size: 410 Bytes
Contents
(defpackage #:strain (:use #:common-lisp) (:export #:keep #:discard)) (in-package #:strain) (defun keep (pred seq) (labels ((recurse (s r) (cond ((null s) (reverse r)) ((funcall pred (car s)) (recurse (cdr s) (cons (car s) r))) (t (recurse (cdr s) r))))) (recurse seq (list)))) (defun discard (pred seq) (keep (complement pred) seq))
Version data entries
396 entries across 396 versions & 1 rubygems