aboutsummaryrefslogtreecommitdiff
path: root/petty-types.lisp
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-08-17 21:19:18 -0700
committercolin <colin@cicadas.surf>2024-08-17 21:19:18 -0700
commit81ac5b999f1dae8bc821634dc3c3bc43239d8d65 (patch)
tree3e8b2289cdf3acb0d0583c412baf3606821d4e7f /petty-types.lisp
parent87cf60328f59b739de1b282dbd020e70a84f076e (diff)
Add: optional type
Diffstat (limited to 'petty-types.lisp')
-rw-r--r--petty-types.lisp3
1 files changed, 3 insertions, 0 deletions
diff --git a/petty-types.lisp b/petty-types.lisp
index 1d092b9..994f2e9 100644
--- a/petty-types.lisp
+++ b/petty-types.lisp
@@ -41,3 +41,6 @@
"Type specifier for vectors all of the same TYPE."
`(satisfies ,(sequence-of-predicate-for 'vector type len)))
+(deftype optional (type)
+ "Type specifier for an optional type."
+ `(or null ,type))