diff options
author | colin <colin@cicadas.surf> | 2024-09-01 08:13:21 -0700 |
---|---|---|
committer | colin <colin@cicadas.surf> | 2024-09-01 08:13:21 -0700 |
commit | 071625684fda19cbb47dad95638fc8cd708ac29b (patch) | |
tree | fc5c9c54b80c25ebc8858a01c49a766f394f21fa /README.org | |
parent | d0c9a208c86cf12bf9e50c7b20a1625257b40c02 (diff) |
Add: TUPLE deftype
Diffstat (limited to 'README.org')
-rw-r--r-- | README.org | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -6,6 +6,7 @@ A tiny library that provides valid type specifier - ~(list-of type &optional len)~ DEFTYPE for a LIST of elements with TYPE - ~(vector-of type &optional len)~ DEFTYPE for a VECTOR of elements with TYPE +- ~(tuple &rest types)~ DEFTYPE for a list of exactly TYPES Here are some examples: @@ -44,4 +45,13 @@ NIL > (typep "abab" '(vector-of (member #\a #\b) 4)) T +;; here is an example of TUPLE + +> (typep '(1 #\x nil :foo) '(tuple fixnum character null keyword)) +T + +> (typep '(1 #\x nil xxx) '(tuple fixnum character null keyword)) +NIL ; Because XXX is not a KEYWORD + + #+end_src |