The comp is the same comp as in clojure.core, but the way that transducers are implemented, comp has the effect of chaining them in a left-to-right manner rather than the way it behaves with regular functions. I actually prefer left-to-right composition, but it is somewhat unfortunate that transducers compose in the opposite direction from normal functions; I suspect this is going to be a point of confusion for many people.
On Sun, Aug 24, 2014 at 11:39 AM, Ashton Kemerling < ashtonkemerl...@gmail.com> wrote: > If you are referring to the new transducer comp, if I recall correctly it > works in the opposite direction from the comp in clojure.core. I can't find > any docs at hand that prove that, so I would check the docstring of comp. > > > On Sun, Aug 24, 2014 at 11:04 AM, rogergl <ro...@gilliar.de> wrote: > >> I have problems to understand how the following code evaluates. I >> understand what the code does but not how this result is computed: >> >> BTW: This is an example from the async webinar: >> >> (chan 1 (comp (map #(.-keyCode %)) >> (filter #{37 39}) >> (map {37 :previous 39 :next}))))) >> >> For example: comp evaluates from right to left. But this code looks more >> like it is evaluated from left to right ? >> >> Regards >> Roger >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clojure@googlegroups.com >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.