diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-09-27 11:11:44 +0300 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-05 14:21:53 +0200 |
| commit | 6e55d34719f89192c9141f50638c6dc5bba71dff (patch) | |
| tree | 33961f9f570b1ff01d0ae11fc6a6c6e3fca2908d /examples/maybe.lisp | |
| parent | 83ae25fe87e3a56d169ae8cfc5bf20423d3ec4a5 (diff) | |
Add holes, builtins, improve matching
Diffstat (limited to 'examples/maybe.lisp')
| -rw-r--r-- | examples/maybe.lisp | 10 |
1 files changed, 6 insertions, 4 deletions
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)) |
