boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

16-prelude.scm (336B)


      1 ;; Prelude gate: map filter fold are embedded and evaluated before the
      2 ;; user program starts.
      3 (if (= (car (map (lambda (x) (+ x 1)) (list 1 2 3))) 2)
      4   (if (= (car (cdr (map (lambda (x) (+ x 1)) (list 1 2 3)))) 3)
      5     (if (= (length (filter positive? (list 0 3 4))) 2)
      6       (if (= (fold + 0 (list 1 2 3 4)) 10)
      7         42 0) 0) 0) 0)