[Haskell-beginners] Haskell equivalent to Clojure's partition fn

Timothy Washington twashing at gmail.com
Sat Jul 25 17:30:26 UTC 2015


Is there a Haskell equivalent to Clojure's partition
<http://clojuredocs.org/clojure.core/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.

What's returned is a list of lists. Each list being a sublist incremented
by `m`. I didn't see anything in the below packages. And I wanted to check
before I go about writing my own.

   - Prelude
   <https://hackage.haskell.org/package/base-4.8.0.0/docs/Prelude.html#g:13>
   - Data.List
   <https://hackage.haskell.org/package/base-4.8.1.0/docs/Data-List.html>
   - Data.Array
   <http://hackage.haskell.org/package/array-0.5.0.0/docs/Data-Array.html>
   - Data.Vector
   <http://hackage.haskell.org/package/vector-0.11.0.0/docs/Data-Vector.html>


Thanks
Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150725/b4232c35/attachment.html>


More information about the Beginners mailing list