From 6e55d34719f89192c9141f50638c6dc5bba71dff Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Tue, 27 Sep 2022 11:11:44 +0300 Subject: Add holes, builtins, improve matching --- examples/maybe.lisp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'examples/maybe.lisp') diff --git a/examples/maybe.lisp b/examples/maybe.lisp index 0447139..fe0b418 100644 --- a/examples/maybe.lisp +++ b/examples/maybe.lisp @@ -9,10 +9,12 @@ (match seq [] (fatal "unsafe-at out of bounds") - (match n - 0 - (head seq) - (unsafe-at (- n 1) (tail seq)))))) + otherwise + (match n + 0 + (head seq) + otherwise + (unsafe-at (- n 1) (tail seq)))))) (let unpack-just (unsafe-at 2)) (let kind (unsafe-at 1)) -- cgit v1.3