# Syntax differences
StreetLISP Scheme
(help help) (help help) (in Racket)
(def (f x y) ...) (define (f x y) ...)
(defmacro (f x y) ...) (define-syntax f ...)
(defstruct ...) (define-record-type ...)
(if cond if-true if-else) (if cond if-true if-else)
(when cond expr) (if cond expr)
(unless cond expr) (if (not cond) expr)
NIL, () null, '()
NIL, T (case-sensitive) #f, #t
(not x) (null? x)
(car ()) → NIL (car '()) → ERROR
(cdr ()) → NIL (cdr '()) → ERROR
(cons? v) (pair? v)
(str sym) (symbol->string sym)
(str ...) (string ...)
(sym str) (string->symbol str)
(num->str n :base radix) (number->string n radix)
(str->num str) (string->number str)
(subseq str start end) (substring str start end)
(length str) (string-length str)
(str-rune str i) (string-ref str i)
(map rune-upcase str) (string-upcase str)
(rune-whitespace? r) (char-whitespace? r)
(rune-upcase r) (char-upcase r)
(rune codepoint) (integer->char codepoint)
(rune->codepoint r) (char->integer r)
(bool? v) (boolean? v)
(int? v) (integer? v)
(num? v) (number? v)
(rune? v) (char? v)
(str? v) (string? v)
(sym? v) (symbol? v)
(vec? v) (vector? v)
(equal? a b) (string=? a b)
(vec->list v) (vector->list v)
(list->vec lst) (list->vector lst)
(length v) (vector-length v)
(aref v i) (vector-ref v i)
(aset! v i x) (vector-set! v i x)