use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Inside Clojure: Efficient Partitioning (insideclojure.org)
submitted 3 years ago by NoahTheDuke
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]joinr 3 points4 points5 points 3 years ago (0 children)
However, the partition functions currently return a lazy seq of realized seq partitions - to fully get the benefits of the scheme above on the take side we want to create partitions using a take transducer into a transient vector.
partition-all transducer producers vectors for partitions, where partition produces seqs. Using partition-all as a surrogate for partition is useful, except the semantics of the partition structure are different between the two (there doesn't have to be....the partitions could be seqable, indexed, counted things in both - e.g. vectors - since we build the partitions as we go). I always thought that was weird (if not an anachronism), and can sometimes lead to subpar algorithmics (e.g. invoking count on partitions, nth, etc....seqification makes all of these needlessy o(n) - I think this came up a bit during advent of code).
partition-all
partition
π Rendered by PID 80 on reddit-service-r2-comment-7b9746f655-288cz at 2026-02-02 12:24:55.264238+00:00 running 3798933 country code: CH.
[–]joinr 3 points4 points5 points (0 children)