aboutsummaryrefslogtreecommitdiff
path: root/README.org
diff options
context:
space:
mode:
Diffstat (limited to 'README.org')
-rw-r--r--README.org10
1 files changed, 10 insertions, 0 deletions
diff --git a/README.org b/README.org
index 9f4cb3e..36b4f4a 100644
--- a/README.org
+++ b/README.org
@@ -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