fix nil pattern matching

This commit is contained in:
Scott Richmond 2024-06-21 11:37:23 -04:00
parent 705be69661
commit e05043e375
2 changed files with 2 additions and 3 deletions

View File

@ -183,7 +183,7 @@
:word (match-word pattern value ctx)
# match on equality
:nil {:success (nil? value) :ctx ctx}
:nil {:success (= :^nil value) :ctx ctx}
:bool {:success (= data value) :ctx ctx}
:number {:success (= data value) :ctx ctx}
:string {:success (= data value) :ctx ctx}

View File

@ -52,8 +52,7 @@
(comment
# (do
(def source `
fn id (x) -> x
map (id, [])
contains? (:d, [:a, :b])
`)
(def out (-> source
ludus