This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-07
Channels
- # admin-announcements (19)
- # announcements (1)
- # beginners (14)
- # boot (244)
- # cider (2)
- # clojure (23)
- # clojure-dev (23)
- # clojure-poland (55)
- # clojure-russia (118)
- # clojure-uk (4)
- # clojurescript (143)
- # core-async (31)
- # core-logic (1)
- # cursive (30)
- # datascript (2)
- # datomic (3)
- # emacs (7)
- # hoplon (40)
- # ldnclj (8)
- # off-topic (2)
- # om (64)
- # reagent (10)
- # ring (1)
- # yada (71)
@danielcompton: I would but I am not sure where to do that :) suggestions welcome...
You could either add something directly to the signup page (but that’s a pain), or put it on here? http://dev.clojure.org/display/community/Contributing
@alexmiller: would you be open to adding an example on http://clojure.org/transducers below > "As a mnemonic, remember that comp of transducer functions is applied in the same order as ->> with sequence functions.”
(->> (range 10)
(map inc)
(filter odd?)
(take 5))
(sequence
(comp
(map inc)
(filter odd?)
(take 5))
(range 10))
It took me a while to understand that sentence as I kept expecting comp to be backwards like it normally is
sure, I'll look at it
the text right before that with "builds a transformation stack that runs left-to-right (filtering happens before mapping in this example)" was trying to be explicit about the ordering - did that not connect?
Seeing an example makes it all connect
If I know what the code is meant to look like then I can understand the explanation
Also, the example of (def xf (comp (filter odd?) (map inc)))
is in the opposite order from the example above it
I know the one above isn’t threading, but it is in close proximity
well that is confusing :)
how's that?
looks good
maybe " equivalent to the sequence transformation order of:”?
Although: As a mnemonic, remember that comp of transducer functions is applied in the same order as ->> with sequence functions. The transformation above is equivalent to the sequence transformation order in:
comp isn’t applying the transducer functions in order
is it?
"As a mnemonic, remember that the ordering of transducer functions in comp is the same order as of sequence transformations with ->>. The transformation above is equivalent to the sequence transformation:"
Yeah that’s good
I made another slight change but I think that's better, thansk
and also thanks