Fixed buge with get-delegates
This commit is contained in:
@@ -13,6 +13,13 @@
|
||||
(let [remover (thought/register-thought! [:EH :CORE :NOP] :ext-stages [[:EH :MSG :REMOVE-DELEGATE msg del]])]
|
||||
(eval/execute! remover)))
|
||||
|
||||
|
||||
;; Forget idea stored in `thought`'s data. Used to make destructors.
|
||||
(def/define! [:EH :IDEA :FORGET]
|
||||
(fn [thought parent]
|
||||
(idea/forget-idea! (thought/data thought))
|
||||
[parent nil]))
|
||||
|
||||
;; FIXME Delegate order is currently undefined! Give this a proper order.
|
||||
;; FIXME needs to be called with a list as second arg??
|
||||
(defn add-delegate
|
||||
@@ -34,6 +41,5 @@
|
||||
[msg]
|
||||
(let [stage [:EH :MSG :DELEGATE msg]
|
||||
dels (-> (thought/register-thought! [:EH :CORE :CONTAINER] :ext-stages [stage])
|
||||
eval/execute! thought/pop-stack second)]
|
||||
(mapcat #(cons % (get-delegates %)) dels)
|
||||
))
|
||||
eval/execute! thought/empty-stack second)]
|
||||
(mapcat #(cons % (get-delegates %)) dels)))
|
||||
|
||||
Reference in New Issue
Block a user