use Tuple for partition results
matthewleon opened this issue · 1 comments
matthewleon commented
The result structure for partition is a bit idiosyncratic:
partition :: forall a. (a -> Boolean) -> Array a -> { yes :: Array a, no :: Array a }I get the impression that, over time, purescript APIs have been preferring Tuples for this kind of thing, rather than ad-hoc records. What do people think of either (breaking) switching the API to returning a Tuple, or making a partition' that returns Tuples?
For comparison, partition from the Haskell prelude:
partition :: (a -> Bool) -> [a] -> ([a], [a])hdgarrood commented
Personally I prefer it how it is, see my comment in purescript/purescript-lists#117