diff options
author | Paul A. Patience <paul@apatience.com> | 2022-01-10 01:52:42 -0500 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-01-12 07:27:11 -0800 |
commit | 096371573bf714a2800a083f39af1278d8def4e5 (patch) | |
tree | cc63ce75a6a1caa58250fb8c19bc8e728263092a | |
parent | 0614418187d02a31addfaebc127e32ec033ff40a (diff) | |
download | txr-096371573bf714a2800a083f39af1278d8def4e5.tar.gz txr-096371573bf714a2800a083f39af1278d8def4e5.tar.bz2 txr-096371573bf714a2800a083f39af1278d8def4e5.zip |
typecase: return nil from formless clauses.
* stdlib/type.tl (typecase): Return nil (as documented) instead of t
when a matching clause has no clause forms.
-rw-r--r-- | stdlib/type.tl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/type.tl b/stdlib/type.tl index 096e7b76..f75c88e2 100644 --- a/stdlib/type.tl +++ b/stdlib/type.tl @@ -30,7 +30,7 @@ (tree-case cl ((type . body) (if (symbolp type) - ^((typep ,val ',type) ,*body) + ^((typep ,val ',type) ,*(or body '(nil))) :)) (else (throwf 'eval-error "~s: bad clause syntax: ~s" |