boot2

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

27-cond.scm (239B)


      1 ;; Step 12c: cond.
      2 (define classify
      3   (lambda (n)
      4     (cond ((< n 0) 'neg)
      5           ((= n 0) 'zero)
      6           (else    'pos))))
      7 (if (eq? (classify -5) 'neg)
      8   (if (eq? (classify 0) 'zero)
      9     (if (eq? (classify 7) 'pos)
     10       42 0) 0) 0)