Add TODO, re: closures
This commit is contained in:
parent
5a72125d1f
commit
0939304518
|
@ -214,7 +214,7 @@
|
||||||
(interpret-synthetic-term (interpret-ast first ctx) second ctx))]
|
(interpret-synthetic-term (interpret-ast first ctx) second ctx))]
|
||||||
(reduce #(interpret-synthetic-term %1 %2 ctx) first-val rest)))
|
(reduce #(interpret-synthetic-term %1 %2 ctx) first-val rest)))
|
||||||
|
|
||||||
(defn- interpret-fn [ast ctx]
|
(defn- interpret-fn [ast ctx] ;; TODO: fix context/closure (no cycles)?
|
||||||
(let [name (:name ast)
|
(let [name (:name ast)
|
||||||
clauses (:clauses ast)]
|
clauses (:clauses ast)]
|
||||||
(if (= name ::ast/anon)
|
(if (= name ::ast/anon)
|
||||||
|
@ -401,7 +401,7 @@
|
||||||
(println (ex-message e))
|
(println (ex-message e))
|
||||||
(pp/pprint (ex-data e)))))
|
(pp/pprint (ex-data e)))))
|
||||||
|
|
||||||
(comment
|
(do
|
||||||
|
|
||||||
(def source "
|
(def source "
|
||||||
|
|
||||||
|
@ -424,7 +424,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@{next}
|
ns Counter {next}
|
||||||
}
|
}
|
||||||
|
|
||||||
print (counter :next ())
|
print (counter :next ())
|
||||||
|
@ -433,6 +433,10 @@
|
||||||
print (counter :next ())
|
print (counter :next ())
|
||||||
print (counter :next ())
|
print (counter :next ())
|
||||||
|
|
||||||
|
let foo = nil
|
||||||
|
|
||||||
|
counter
|
||||||
|
|
||||||
")
|
")
|
||||||
|
|
||||||
(println "")
|
(println "")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user