Closed chshersh closed 3 years ago
Currently, slist has the following function:
slist
partition :: forall a. (a -> Bool) -> Slist a -> (Slist a, Slist a)
But sometimes it's desirable to change the types of lists, and the function like below can be helpful:
partitionOn :: (a -> Either b c) -> Slist a -> (Slist b, Slist c)
The name can be different :slightly_smiling_face: But I wanted something like this for ordinary lists so many times...
Currently,
slist
has the following function:But sometimes it's desirable to change the types of lists, and the function like below can be helpful:
The name can be different :slightly_smiling_face: But I wanted something like this for ordinary lists so many times...