| •1 |
Character Primitives |
| 2 |
(char=? #\a #\b) --> #f |
| 3 |
(char=? #\a #\a) --> #t |
| 4 |
(char=? #\a #\A) --> #f |
| 5 |
(char<? #\a #\b) --> #t |
| 6 |
(char<? #\a #\a) --> #f |
| 7 |
(char<? #\a #\A) --> #f |
| 8 |
(char<=? #\a #\b) --> #t |
| 9 |
(char<=? #\a #\a) --> #t |
| 10 |
(char<=? #\a #\A) --> #f |
| 11 |
(char>? #\a #\b) --> #f |
| 12 |
(char>? #\a #\a) --> #f |
| 13 |
(char>? #\a #\A) --> #t |
| 14 |
(char>=? #\a #\b) --> #f |
| 15 |
(char>=? #\a #\a) --> #t |
| 16 |
(char>=? #\a #\A) --> #t |
| 17 |
(char-ci=? #\a #\b) --> #f |
| 18 |
(char-ci=? #\a #\a) --> #t |
| 19 |
(char-ci=? #\a #\A) --> #t |
| 20 |
(char-ci<? #\a #\b) --> #t |
| 21 |
(char-ci<? #\a #\a) --> #f |
| 22 |
(char-ci<? #\a #\A) --> #f |
| 23 |
(char-ci<=? #\a #\b) --> #t |
| 24 |
(char-ci<=? #\a #\a) --> #t |
| 25 |
(char-ci<=? #\a #\A) --> #t |
| 26 |
(char-ci>? #\a #\b) --> #f |
| 27 |
(char-ci>? #\a #\a) --> #f |
| 28 |
(char-ci>? #\a #\A) --> #f |
| 29 |
(char-ci>=? #\a #\b) --> #f |
| 30 |
(char-ci>=? #\a #\a) --> #t |
| 31 |
(char-ci>=? #\a #\A) --> #t |
| 32 |
|
| 33 |
Character Properties |
| 34 |
(char-property space? #\ ) --> #t |
| 35 |
(char-property space? #\ foo) --> #t |
| 36 |
(char-property space? #\!) --> #f |
| 37 |
(char-property space? #\! foo) --> foo |
| 38 |
(char-property break-before-priority #\ ) --> 2 |
| 39 |
(char-property break-after-priority #\ ) --> 3 |
| 40 |
(char-property break-before-priority #\a) --> 1 |
| 41 |
(char-property break-after-priority #\a) --> 1 |
| 42 |
(char-property funny #\a) --> #\a |
| 43 |
(char-property funny #\b) --> #\a |
| 44 |
(char-property funny #\c) --> #\a |
| 45 |
(char-property funny #\d) --> boring |
| 46 |
(char-property funny #\e) --> boring |
| 47 |
(char-property funny #\z) --> boring |
| 48 |
|
| 49 |
String Primitives |
| 50 |
|
| 51 |
Standard examples |
| 52 |
(not #t) --> #f |
| 53 |
(not 3) --> #f |
| 54 |
(not (3)) --> #f |
| 55 |
(not #f) --> #t |
| 56 |
(not ()) --> #f |
| 57 |
(not ()) --> #f |
| 58 |
(not nil) --> #f |
| 59 |
(boolean? #f) --> #t |
| 60 |
(boolean? 0) --> #f |
| 61 |
(boolean? ()) --> #f |
| 62 |
(pair? (a . b)) --> #t |
| 63 |
(pair? (a b c)) --> #t |
| 64 |
(pair? ()) --> #f |
| 65 |
(cons a ()) --> (a) |
| 66 |
(cons (a) (b c d)) --> ((a) b c d) |
| 67 |
(cons "a" (b c)) --> ("a" b c) |
| 68 |
(cons a 3) --> (a . 3) |
| 69 |
(cons (a b) c) --> ((a b) . c) |
| 70 |
(car (a b c)) --> a |
| 71 |
(car ((a) b c d)) --> (a) |
| 72 |
(car (1 . 2)) --> 1 |
| 73 |
(cdr ((a) b c d)) --> (b c d) |
| 74 |
(cdr (1 . 2)) --> 2 |
| 75 |
(list? (a b c)) --> #t |
| 76 |
(list? ()) --> #t |
| 77 |
(list? (a . b)) --> #f |
| 78 |
(list a 7 c) --> (a 7 c) |
| 79 |
(list) --> () |
| 80 |
(length (a b c)) --> 3 |
| 81 |
(length (a (b) (c d e))) --> 3 |
| 82 |
(length ()) --> 0 |
| 83 |
(append (x) (y)) --> (x y) |
| 84 |
(append (a) (b c d)) --> (a b c d) |
| 85 |
(append (a (b)) ((c))) --> (a (b) (c)) |
| 86 |
(append (a b) (c . d)) --> (a . (b . (c . d))) |
| 87 |
(append () a) --> a |
| 88 |
(reverse (a b c)) --> (c b a) |
| 89 |
(reverse (a (b c) d (e (f)))) --> ((e (f)) d (b c) a) |
| 90 |
(list-ref (a b c d) 2) --> c |
| 91 |
(list-ref (a b c d) 2) --> c |
| 92 |
(member a (a b c)) --> (a b c) |
| 93 |
(member b (a b c)) --> (b c) |
| 94 |
(member a (b c d)) --> #f |
| 95 |
(assoc a ((a 1) (b 2) (c 3))) --> (a 1) |
| 96 |
(assoc b ((a 1) (b 2) (c 3))) --> (b 2) |
| 97 |
(assoc d ((a 1) (b 2) (c 3))) --> #f |
| 98 |
(symbol? foo) --> #t |
| 99 |
(symbol? a) --> #t |
| 100 |
(symbol? "bar") --> #f |
| 101 |
(symbol? nil) --> #t |
| 102 |
(symbol? ()) --> #f |
| 103 |
(symbol? #f) --> #f |
| 104 |
(symbol->string flying-fish) --> "flying-fish" |
| 105 |
(symbol->string Malvina) --> "Malvina" |
| 106 |
(equal? mISSISSIppi mississippi) --> #f |
| 107 |
(equal? bitBlt bitBlt) --> #t |
| 108 |
(equal? JollyWog JollyWog) --> #t |
| 109 |
(string=? "K. Harper, M.D." "K. Harper, M.D.") --> #t |
| 110 |
(keyword->string Argentina:) --> "Argentina" |
| 111 |
(string->keyword "foobar") --> foobar: |
| 112 |
(real? 3) --> #t |
| 113 |
(integer? 3) --> #t |
| 114 |
(max 3 4) --> 4 |
| 115 |
(max 3.9 4) --> 4 |
| 116 |
(+ 3 4) --> 7 |
| 117 |
(+ 3) --> 3 |
| 118 |
(+) --> 0 |
| 119 |
(* 4) --> 4 |
| 120 |
(*) --> 1 |
| 121 |
(- 3 4) --> -1 |
| 122 |
(- 3 4 5) --> -6 |
| 123 |
(- 3) --> -3 |
| 124 |
(/ 3 4 5) --> 0.15 |
| 125 |
(/ 3) --> 0.333333 |
| 126 |
(abs -7) --> 7 |
| 127 |
(modulo 13 4) --> 1 |
| 128 |
(remainder 13 4) --> 1 |
| 129 |
(modulo -13 4) --> 3 |
| 130 |
(remainder -13 4) --> -1 |
| 131 |
(modulo 13 -4) --> -3 |
| 132 |
(remainder 13 -4) --> 1 |
| 133 |
(modulo -13 -4) --> -1 |
| 134 |
(remainder -13 -4) --> -1 |
| 135 |
(remainder -13 -4) --> -1 |
| 136 |
(floor -4.3) --> -5 |
| 137 |
(ceiling -4.3) --> -4 |
| 138 |
(truncate -4.3) --> -4 |
| 139 |
(round -4.3) --> -4 |
| 140 |
(floor 3.5) --> 3 |
| 141 |
(ceiling 3.5) --> 4 |
| 142 |
(truncate 3.5) --> 3 |
| 143 |
(round 3.5) --> 4 |
| 144 |
(round 7) --> 7 |
| 145 |
(string->number "100") --> 100 |
| 146 |
(string->number "100" 16) --> 256 |
| 147 |
(string->number "1e2") --> 100 |
| 148 |
(procedure? procedure) --> #t |
| 149 |
(procedure? car) --> #f |
| 150 |
(procedure? procedure) --> #t |
| 151 |
(procedure? (lambda (x) (* x x))) --> #f |
| 152 |
(apply procedure (3 4)) --> 7 |
| 153 |
(map procedure ((a b) (d e) (g h))) --> (b e h) |
| 154 |
(map procedure (1 2 3 4 5)) --> (1 4 27 256 3125) |
| 155 |
(map procedure (1 2 3) (4 5 6)) --> (5 7 9) |
| 156 |
|