aboutsummaryrefslogtreecommitdiffstats
path: root/examples/types.bdl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/types.bdl')
-rw-r--r--examples/types.bdl21
1 files changed, 10 insertions, 11 deletions
diff --git a/examples/types.bdl b/examples/types.bdl
index 43b7be9..36dab7a 100644
--- a/examples/types.bdl
+++ b/examples/types.bdl
@@ -12,14 +12,14 @@
12(print "(boolean? (not 1)) -> ") (boolean? (not 1)) 12(print "(boolean? (not 1)) -> ") (boolean? (not 1))
13 13
14;; Empty list/null. 14;; Empty list/null.
15(print "(null? true) -> ") (null? true) 15(print "(nil? true) -> ") (nil? true)
16(print "(null? false) -> ") (null? false) 16(print "(nil? false) -> ") (nil? false)
17(print "(null? 1) -> ") (null? 1) 17(print "(nil? 1) -> ") (nil? 1)
18(print "(null? 5) -> ") (null? 5) 18(print "(nil? 5) -> ") (nil? 5)
19(print "(null? \"string\") -> ") (null? "string") 19(print "(nil? \"string\") -> ") (nil? "string")
20(print "(null? (+ 1 2 3)) -> ") (null? (+ 1 2 3)) 20(print "(nil? (+ 1 2 3)) -> ") (nil? (+ 1 2 3))
21(print "(null? (not 1)) -> ") (null? (not 1)) 21(print "(nil? (not 1)) -> ") (nil? (not 1))
22(print "(null? ()) -> ") (null? ()) 22(print "(nil? ()) -> ") (nil? ())
23 23
24;; String. 24;; String.
25(print "(string? true) -> ") (string? true) 25(print "(string? true) -> ") (string? true)
@@ -40,7 +40,6 @@
40(print "(fixnum? (not 1)) -> ") (fixnum? (not 1)) 40(print "(fixnum? (not 1)) -> ") (fixnum? (not 1))
41 41
42;; Symbol 42;; Symbol
43;; TODO: We need quotation to test for symbols.
44(print "(symbol? true) -> ") (symbol? true) 43(print "(symbol? true) -> ") (symbol? true)
45(print "(symbol? false) -> ") (symbol? false) 44(print "(symbol? false) -> ") (symbol? false)
46(print "(symbol? 1) -> ") (symbol? 1) 45(print "(symbol? 1) -> ") (symbol? 1)
@@ -48,8 +47,8 @@
48(print "(symbol? \"string\") -> ") (symbol? "string") 47(print "(symbol? \"string\") -> ") (symbol? "string")
49(print "(symbol? (+ 1 2 3)) -> ") (symbol? (+ 1 2 3)) 48(print "(symbol? (+ 1 2 3)) -> ") (symbol? (+ 1 2 3))
50(print "(symbol? (not 1)) -> ") (symbol? (not 1)) 49(print "(symbol? (not 1)) -> ") (symbol? (not 1))
51; (print "(symbol? 'a) -> ") (symbol? 'a) 50(print "(symbol? 'a) -> ") (symbol? 'a)
52; (print "(symbol? 'c) -> ") (symbol? 'c) 51(print "(symbol? 'c) -> ") (symbol? 'c)
53 52
54;; Pair. 53;; Pair.
55(print "(pair? false) -> ") (pair? false) 54(print "(pair? false) -> ") (pair? false)