application/octet-stream
•
1.16 KB
•
28 lines
(1 (read/int "1"))
(1 (read/int "1.0"))
(1 (read/int "1.2"))
(1 (read/int " \n\t1"))
(-1 (read/int "-1"))
(-1 (read/int " -1"))
(:type-error (try car (let ((a 10)) (when (when #t (set! a (+ 2 "2")) #f) (set! a -1)) a)))
;(:type-error (try car (apply (fn (α) (+ 1 α)))))
;(:type-error (try car (def cb (fn (α) (+ 1 α))) (apply cb)))
;(:type-error (try car (let ((cb (fn (α) (+ 1 α)))) (apply cb))))
;(:type-error (try car (let* (def cb (fn (α) (+ 1 α))) (apply cb))))
(:type-error (try car (+ '1 '(2))))
(:type-error (try car (- '1 '(2))))
(:type-error (try car (- '1 '(2 3))))
(:type-error (try (fn (e) (car e)) (+ "1" "2")))
(:type-error (try (fn (e) (car e)) (sin 1)))
(:type-error (try (fn (e) (car e)) (ceil 1)))
(:type-error (try (fn (e) (car e)) (floor 1)))
(:type-error (try (fn (e) (car e)) (round 1)))
(:type-error (try car (+ #x10#f)))
(:type-error (try car (+ #x10"16")))
(:type-error (try car (int "8")))
;(:type-error (try car (+ (cadr '(1 2)) (cadr #nil) (cadr '(1)))))
(:type-error (try car (int "a1")))
(:type-error (try car (int "1a")))
(:type-error (try car (int "1 a")))
(:type-error (try car (def cb '+) (apply cb)))
(#t (= (:symbol "asd") (:symbol :asd)))