A collection of various methods for splittinglists into parts, akin to the "split" functionfound in several mainstream languages. Here isits tale:
Once upon a time the standardData.List moduleheld no function for splitting a list into partsaccording to a delimiter. Many a bravelambda-knight strove to add such a function, buttheir striving was in vain, for Lo, the SupremeCouncil fell to bickering amongst themselves whatwas to be the essential nature of the One TrueFunction which could cleave a list in twain (orthrain, or any required number of parts).
And thus came to pass the split package,comprising divers functions for splitting a listasunder, each according to its nature. And theSupreme Council had no longer any grounds forargument, for the favored method of each wascontained therein.
To get started, see theData.List.Split module.
For package maintainers and hackage trustees
Candidates
Versions[RSS] | 0.1,0.1.1,0.1.2,0.1.2.1,0.1.2.2,0.1.2.3,0.1.3,0.1.4,0.1.4.1,0.1.4.2,0.1.4.3,0.2.0.0,0.2.1.0,0.2.1.1,0.2.1.2,0.2.1.3,0.2.2,0.2.3,0.2.3.1,0.2.3.2,0.2.3.3,0.2.3.4,0.2.3.5,0.2.4,0.2.5 |
---|---|
Change log | CHANGES |
Dependencies | base (<5) [details] |
Tested with | ghc ==9.8.1 || ==9.6.3 || ==9.4.8 || ==9.2.8 || ==9.0.2 || ==8.10.7 || ==8.8.4 || ==8.6.5 || ==8.4.4 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2 || ==7.2.2 || ==7.0.4 |
License | BSD-3-Clause |
Copyright | (c) Brent Yorgey, Louis Wasserman 2008-2012 |
Author | Brent Yorgey |
Maintainer | byorgey@gmail.com |
Category | List |
Bug tracker | https://github.com/byorgey/split/issues |
Source repo | head: git clonehttp://github.com/byorgey/split.git |
Uploaded | byBrentYorgey at2024-01-11T16:34:00Z |
Distributions | Arch:0.2.5, Debian:0.2.3.4, Fedora:0.2.3.5, FreeBSD:0.2.2, LTSHaskell:0.2.5, NixOS:0.2.5, Stackage:0.2.5, openSUSE:0.2.5 |
Reverse Dependencies | 542 direct, 7821 indirect [details] |
Downloads | 238281 total (98 in the last 30 days) |
Rating | 2.25 (votes: 2)[estimated byBayesian average] |
Your Rating |
|
Status | Docs available[build log] Last success reported on 2024-01-11[all 1 reports] |
Data.List.Split
provides a wide range of strategies and a unifiedcombinator framework for splitting lists with respect to some sort ofdelimiter. Seehttps://hackage.haskell.org/package/split/docs/Data-List-Split.htmlto get started using it.
There are no dependencies other than the base package.Data.List.Split
is currently tested with versions of GHC from 7.0 upthrough 9.6. It is completely Haskell2010 (probably also Haskell98)compliant, so it probably builds with other compilers as well.
The tests inProperties.hs
depend onQuickCheck
>= 2.4, but youdon't need it in order to build the library itself, only to run thetests.