1
0
Fork 0
lesson-lisp/lib/type_predicates.scm

8 lines
496 B
Scheme

(define (boolean? x) (equal? 'boolean (arcana/typeof x)))
(define (char? x) (equal? 'char (arcana/typeof x)))
(define (null? x) (equal? 'null (arcana/typeof x)))
(define (number? x) (equal? 'number (arcana/typeof x)))
(define (pair? x) (equal? 'pair (arcana/typeof x)))
(define (procedure? x) (equal? 'procedure (arcana/typeof x)))
(define (string? x) (equal? 'string (arcana/typeof x)))
(define (symbol? x) (equal? 'symbol (arcana/typeof x)))