boot2

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

059-stringq.scm (541B)


      1 ; Strings and bytevectors are disjoint categories.
      2 
      3 (if (string? "abc") 0 (sys-exit 1))
      4 (if (string? "")    0 (sys-exit 2))
      5 (if (string? (make-string 4 #\null)) 0 (sys-exit 3))
      6 (if (not (string? (make-bytevector 4 0))) 0 (sys-exit 4))
      7 
      8 (if (not (string? 42))   0 (sys-exit 5))
      9 (if (not (string? 'foo)) 0 (sys-exit 6))
     10 (if (not (string? '()))  0 (sys-exit 7))
     11 (if (not (string? '(1 2))) 0 (sys-exit 8))
     12 (if (not (string? #t))   0 (sys-exit 9))
     13 (if (not (string? #f))   0 (sys-exit 10))
     14 (if (not (string? car))  0 (sys-exit 11))
     15 
     16 (sys-exit 0)