mirror of
https://github.com/kanaka/mal.git
synced 2024-10-26 14:22:25 +03:00
mal: implement macro? with contains? instead of list equality
This is more efficient, and avoids triggering some bugs (see #400).
This commit is contained in:
parent
809d74cba7
commit
72a66d2e60
@ -1,11 +1,11 @@
|
||||
(def! _map? (fn* [x]
|
||||
(if (map? x)
|
||||
(not (= (keys x) '(:__MAL_MACRO__)))
|
||||
(not (contains? x :__MAL_MACRO__))
|
||||
false)))
|
||||
|
||||
(def! _macro? (fn* [x]
|
||||
(if (map? x)
|
||||
(= (keys x) '(:__MAL_MACRO__))
|
||||
(contains? x :__MAL_MACRO__)
|
||||
false)))
|
||||
|
||||
(def! core_ns
|
||||
|
Loading…
Reference in New Issue
Block a user