Array search functions.
spago install array-searchDocumentation and more detailed examples are hosted on Pursuit.
> some (\x -> x > 1) [ 1, 2, 3, 4 ]
true
> some (\x -> x > 5) [ 1, 2, 3, 4 ]
false> every (\x -> x > 0) [ 1, 2, 3, 4 ]
true
> every (\x -> x > 1) [ 1, 2, 3, 4 ]
false> findEachIndex (\x -> x > 1) [ 1, 2, 3, 4 ]
[1, 2, 3]> smallest [ 1, 2, 3, 4 ]
1
> largest [ 1, 2, 3, 4 ]
4> smallestWhere (\x -> x > 1) [ 1, 2, 3, 4 ]
2
> largestWhere (\x -> x > 1) [ 1, 2, 3, 4 ]
4> smallestAbove 1 [ 1, 2, 3, 4 ]
2
> largestBelow 2 [ 1, 2, 3, 4 ]
1Why provide findEachIndex only?
What about find, findLast, findIndex, findLastIndex and findEach?
purescript-arraysprovidesfind,findLast,findIndexandfindLastIndexfindEachis synonymous withfilter
To install dependencies:
yarn install
yarn spago installTo run tests:
yarn spago testTo generate the documentation locally:
yarn spago docsTo run linters:
yarn lintTo run formatters:
yarn formatPlease read this repository's Code of Conduct which outlines our collaboration standards and the Changelog for details on breaking changes that have been made.
This repository adheres to semantic versioning standards. For more information on semantic versioning visit SemVer.
Bump2version is used to version and tag changes. For example:
bump2version patch- Joel Lefkowitz - Initial work
Lots of love to the open source community!