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 | 740ece8a507d3a61b048b7bf8aa4dd3e94cdb665 (patch) | |
tree | cc63ce75a6a1caa58250fb8c19bc8e728263092a /stdlib | |
parent | df49a0adefd929a6a77cf81c0adcdbd7157fcbb7 (diff) | |
download | txr-740ece8a507d3a61b048b7bf8aa4dd3e94cdb665.tar.gz txr-740ece8a507d3a61b048b7bf8aa4dd3e94cdb665.tar.bz2 txr-740ece8a507d3a61b048b7bf8aa4dd3e94cdb665.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.
Diffstat (limited to 'stdlib')
-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" |