boot2

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

078-symbolq.scm (517B)


      1 ; symbol? — #t iff x is a HEAP-tagged HDR.SYM (an interned symbol).
      2 
      3 (if (symbol? 'foo) 0 (sys-exit 1))
      4 (if (symbol? (quote bar)) 0 (sys-exit 2))
      5 (if (symbol? (string->symbol "baz")) 0 (sys-exit 3))
      6 
      7 (if (not (symbol? "foo")) 0 (sys-exit 4))
      8 (if (not (symbol? 0)) 0 (sys-exit 5))
      9 (if (not (symbol? '())) 0 (sys-exit 6))
     10 (if (not (symbol? '(a b))) 0 (sys-exit 7))
     11 (if (not (symbol? #t)) 0 (sys-exit 8))
     12 (if (not (symbol? car)) 0 (sys-exit 9))
     13 (if (not (symbol? (make-bytevector 1 0))) 0 (sys-exit 10))
     14 
     15 (sys-exit 0)