Ah ok. Got it. On Wed, Feb 18, 2015 at 9:13 AM, Fluid Dynamics <a2093...@trbvm.com> wrote:
> On Tuesday, February 17, 2015 at 10:24:29 PM UTC-5, Udayakumar Rayala > wrote: >> >> Then probably (apply concat) is better than (mapcat identity) isnt it? >> >> What is (cons ::sentinel)? Why do you need it here? >> > > It'll drop the wrong elements otherwise: > > => (->> (range 1 22) > (partition 5 5 nil) > (mapcat next)) > (2 3 4 5 7 8 9 10 12 13 14 15 17 18 19 20) > > All the partitions need to be shifted by one position to the left, so the > elements to drop are at their left edges, if we want to use the efficient > "next" instead of the evil linear-time "butlast" in the later step. But > that can be done by prepending a dummy element to the input, which will > conveniently go away as one of the elided elements. > > -- > 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.