On Sat, Jul 25, 2015, at 10:30 AM, Timothy Washington wrote:
Is there a Haskell equivalent to
Clojure's partition function? I'm particularly interested in the stepwise feature, where we can select a certain `n` size of the list, then step `m` and take again.
This is a great use case for a type-based search engine. Luckily, we have some of those!
Here is a search that matches your question, I think:
At this moment, there is one result, which appears to be exactly the thing you want. Unfortunately, it's an auxiliary function of a music theory package, which you may not want to install for that one function.
There's a package called "split" that contains a bunch of useful tools for splitting lists. It doesn't have exactly what you want, but it does have a function called "chop" that will get you most of the way there:
-Karl