This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-20
Channels
- # aleph (19)
- # aws-lambda (8)
- # bangalore-clj (1)
- # beginners (13)
- # boot (179)
- # cljs-dev (12)
- # cljsjs (2)
- # cljsrn (6)
- # clojure (174)
- # clojure-italy (14)
- # clojure-nl (2)
- # clojure-russia (172)
- # clojure-spec (29)
- # clojure-uk (22)
- # clojurebridge (10)
- # clojureremote (1)
- # clojurescript (79)
- # cursive (46)
- # data-science (1)
- # datascript (8)
- # datomic (18)
- # defnpodcast (2)
- # emacs (9)
- # events (6)
- # hoplon (11)
- # klipse (13)
- # lein-figwheel (1)
- # leiningen (1)
- # luminus (1)
- # lumo (88)
- # numerical-computing (1)
- # off-topic (24)
- # om (33)
- # onyx (58)
- # protorepl (8)
- # re-frame (10)
- # reagent (26)
- # ring (8)
- # ring-swagger (7)
- # rum (22)
- # spacemacs (25)
- # specter (5)
- # uncomplicate (37)
- # untangled (75)
- # vim (17)
- # yada (3)
quick question about channels! i have a collection of maps, each with an :id and a :chan. i want to map over them and take their values as they come back in. what might i be doing wrong?
(def some-channel-maps [{:id "abc" :chan a-channel} {:id "xyz" :chan a-channel}])
(go
(doall (map (fn [{:keys [chan id]}]
(println "GOT" (<! chan) "from" id)))
some-channel-maps))
You can do a println before/after the current one to check if a-channel is what is the blocker
yup, the channels have a take-able value. if i isolate the first channel in the sequence and take from it directly outside of the map
then i get a value.
maybe it's the position of the go block. if i move the 'go' into its own function then it seems to work:
(defn single [{:keys [path chan] :as s}]
(go (dispatch [:qb/some-event path (<! chan)])))
(fn [chans] (doall (map single chans)))
👋 have an issue with setting up reagent-template and drift's lein create-migration
, would be grateful for advise. Tried putting down description in gist here: https://gist.github.com/sudodoki/98b422931a79301ed0f543df29306fb7