Jon-Michael Deldin

BMX, bike trials, & software from the Pacific Northwest

Scheme Sandbox

Because the world needed another unfinished Scheme library. I’ve been working through the Little Schemer this summer and thought I’d record my progress in a Github project. Here’s a quick sample:

;; (jm/select (lambda (x) (eq? x 2)) '(2 3 4 2)) => '(2 2)
(define (jm/select f l)
  (define (aux matches remaining)
    (if (null? remaining)
        (aux (if ((eval f) (car remaining))
                 (cons (car remaining) matches)
                 matches) (cdr remaining))))
  (aux '() l))

Send me an email for enterprise pricing.

* * *