Match outer forms first - from Kevin's issue #23
This commit is contained in:
parent
4963421cff
commit
9cec3ee154
2 changed files with 2 additions and 1 deletions
|
@ -42,6 +42,7 @@ Bugs can be reported using the github bug tracker.
|
|||
* Phil Hagelberg
|
||||
* Alan Malloy
|
||||
* Paul deGrandis
|
||||
* Kevin Lynagh
|
||||
|
||||
## TODO
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
;; Simplifies expr according to the rules until no more rules apply.
|
||||
(defn simplify [expr rules]
|
||||
(->> expr
|
||||
(iterate (partial walk/postwalk #(simplify-one % rules)))
|
||||
(iterate (partial walk/prewalk #(simplify-one % rules)))
|
||||
(partition 2 1)
|
||||
(drop-while #(apply not= %))
|
||||
(ffirst)))
|
||||
|
|
Loading…
Reference in a new issue