This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defnk foo [x y [s 1]] | |
(+ x (* y s))) | |
(foo {:x 2 :y 3 :s 2}) | |
;; ==> 8 | |
(foo {:x 2 :y 3}) | |
;; 's' defaulted to 1 | |
;; ==> 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root (-> (dp/poller-graph s) | |
(add-edge (fn [x] | |
(log/info (format "Finished an entry %s has body: %s" | |
(-> x :entry :link) (not (nil? (-> x :entry :body))))))) | |
zip/root graph-zip zip/down zip-down ; Move to feed-fetch-node | |
(add-edge (fn [{k :key b :body}] | |
(let [es (set (feeds/extract-entries b))] | |
(swap! fetched-feeds conj k) | |
(swap! extracted-entries set/union es) | |
(log/info (format "Added %d entries from %s." (count es) k)))))) |