From 096371573bf714a2800a083f39af1278d8def4e5 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Mon, 10 Jan 2022 01:52:42 -0500 Subject: 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. --- stdlib/type.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- cgit v1.2.3