ded935a907b7 — Leonard Ritter 2 months ago
* `dispatch` protocol accepts multiple switch arguments
1 files changed, 2 insertions(+), 2 deletions(-)

M lib/scopes/core.sc
M lib/scopes/core.sc +2 -2
@@ 8061,7 8061,7 @@ do
 # dispatch form
 #-------------------------------------------------------------------------------
 
-sugar dispatch (value)
+sugar dispatch (value...)
     loop (next outp = next-expr '())
         sugar-match next
         case (('case (name is Symbol) (args...) body...) rest...)

          
@@ 8076,7 8076,7 @@ sugar dispatch (value)
             let anchor = ('anchor ('@ next))
             let _inline = ('tag `inline anchor)
             return
-                qq '__dispatch [value] (unquote-splice ('reverse outp))
+                qq '__dispatch (unquote-splice value...) (unquote-splice ('reverse outp))
                     [_inline] "#hidden" () (unquote-splice body...)
                 rest...
         default