code cleanup
This commit is contained in:
@@ -37,26 +37,19 @@
|
||||
Returns a map of {stage => #{thought}}."
|
||||
[thought]
|
||||
(let [stages (thought/stages thought)
|
||||
filter-fn #(contract/evaluate (thought/contract thought) %)
|
||||
aspects (map
|
||||
#(->> % get-extensions (filter filter-fn))
|
||||
stages)]
|
||||
aspects (map get-extensions stages)]
|
||||
(zipmap stages aspects)))
|
||||
|
||||
(defn pop-stage
|
||||
"Get aspects of next stage of thought execution.
|
||||
Returns a tuple of (#{extension-dhammas},
|
||||
Returns a tuple of (#{extensions},
|
||||
a copy of `thought` with its first extension-stage removed)."
|
||||
[thought]
|
||||
(let [stages (thought/stages thought)
|
||||
aspects (filter #(contract/evaluate (thought/contract thought) %)
|
||||
(get-extensions (first stages)))
|
||||
aspects (get-extensions (first stages))
|
||||
|
||||
;; FIXME idk why this was here, but it's wrong--
|
||||
;; I've commented it out now, probably breaks something elsewhere!
|
||||
;; aspects (prop/with-property (magic/extension-prop (first stages)))
|
||||
modified (prtc/copy-fn #(assoc % :ext-stages (rest stages))
|
||||
thought)]
|
||||
thought)]
|
||||
(list aspects modified)))
|
||||
|
||||
(defn has-stage?
|
||||
|
Reference in New Issue
Block a user