This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-26
Channels
- # aws-lambda (15)
- # babashka (7)
- # beginners (124)
- # calva (7)
- # cider (19)
- # clj-kondo (26)
- # clojure (261)
- # clojure-australia (3)
- # clojure-dev (10)
- # clojure-europe (45)
- # clojure-nl (4)
- # clojure-uk (6)
- # clojurescript (10)
- # datomic (7)
- # depstar (7)
- # emacs (11)
- # fulcro (41)
- # graalvm (48)
- # helix (1)
- # honeysql (17)
- # inf-clojure (7)
- # introduce-yourself (3)
- # jackdaw (2)
- # lsp (36)
- # malli (2)
- # meander (2)
- # membrane (1)
- # missionary (11)
- # off-topic (17)
- # pathom (83)
- # polylith (15)
- # re-frame (31)
- # reagent (42)
- # sci (35)
- # shadow-cljs (13)
- # spacemacs (13)
- # sql (19)
- # timbre (3)
- # tools-deps (77)
I have yet another question ๐ Having a flow
, Iโd like to reduce it (e.g. with +
) and then call a function whenever the reduced flow emitted a new value (or maybe even only if the resulting reduced value changed)
@leonoel yeah that looks promising. reductions
also returns a flow does it? How would I consume each item from the flow with a callback function or similar? And could I somehow filter reductions that donโt yield new/different values? (e.g. + 0
)
if the business logic is really hairy, you could also consider writing a custom transducer
Gotcha, eduction + dedupe makes sense
And as to map
โ I would then use eduction
with map
to trigger the side effect?
Cool. Feels a little strange to do side effects inside map
but I guess I can get used to that ๐