You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find there are some usefull functions for both List and NotEmptyList, such as:
// The partition function takes a predicate and a list, and returns the pair of lists of elements which do and do not satisfy the predicateconstpartition=<T>(predicate: (item: T)=>boolean,xs: List<T>): [List<T>,List<T>];// takeWhile applied to a predicate p and a list xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p.consttakeWhile=<T>(p: (item: T)=>boolean,xs: List<T>): List<T>;
so would you implement more about such functions on List?
or do you need a PR?
The text was updated successfully, but these errors were encountered:
Purify only includes Array helpers that benefit from types like Maybe, for general purpose helpers there are tons of other specialized libraries that would do just as well and even better, honestly
I find there are some usefull functions for both
List
andNotEmptyList
, such as:so would you implement more about such functions on
List
?or do you need a PR?
The text was updated successfully, but these errors were encountered: