This package aims to be a vector-based replacement for the list-based split package.
Every function in vector-split is quickchecked against its split counterpart. Additionally the code examples in the documentation are checked with doctest. In theory this means that the library are functionally equally. Some caveats remain.
This package should be close to 100% API compatible with split if you discount the fact that it is working on vectors. Two caveats remain, in order of (my perceived) severity:
vector-splitmust not be used with empty delimiters. Insplitthis is handled as a special case and there is documentation in place not to do it either, so there is no special support invector-split.condensedoes not work exactly like thesplitcounterpart. This is mostly due to howsplitis basically a monolithic function which can not exactly be reproduced by combining smaller functions. If this ever becomes a problem in a real use case please file an issue on github.- In
vector-splitstrategies are just functionsVector v a => v a -> [v a]compared tosplitsADTSplittertype. This means that strategy transformers are chained by function composition instead of application:vector-split:dropDelims . oneOf "xyz"vssplit:dropDelims (oneOf "xyz").