boot2

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

047-or.scm (510B)


      1 ; (or) is #f; (or a b c) returns first non-#f or the last; short-circuits.
      2 (if (or) (sys-exit 1) 0)                    ; (or) -> #f
      3 (if (or 5) 0 (sys-exit 2))                  ; single arg returns its value
      4 (if (or #f #f 7) 0 (sys-exit 3))            ; falls through to the truthy tail
      5 (if (or #f #f #f) (sys-exit 4) 0)           ; all #f -> #f
      6 (if (or 5 (sys-exit 99)) 0 (sys-exit 5))    ; truthy short-circuits the rest
      7 (sys-exit (or #f #f 42))                    ; returns last value when no truthy earlier