-
Notifications
You must be signed in to change notification settings - Fork 50
partition #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
partition #117
Conversation
7b5db2a to
801f53b
Compare
|
Just realized that there was a commented-out previous attempt at this. Have removed it in this PR. |
|
Most core libraries do tend to prefer records over tuples, as it is much easier to remember which part of the result is which this way. Thanks for this but I think I prefer it how it is now. |
|
Oh, didn't realise this function doesn't exist here yet! Okay yeah looks good except I think it would be better to use the same style as in arrays currently. |
|
Okay, I'll adjust this accordingly. Thanks. |
|
Should be good now. |
hdgarrood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
|
I am inclined to agree, but |
|
Btw what's the reason behind using reverse and foldl for strict lists? Also, these were also added for lists in purescript-filterable not long ago :) |
Stack safety, if I remember rightly. |
|
Oh, looks like foldr is also defined by reverse and foldl 😄 https://github.com/purescript/purescript-lists/blob/master/src/Data/List/Types.purs#L68 |
Thanks @LiamGoodacre for this. I've basically copied your work over from |
|
Thanks! |
Returns a
Tupleas in Haskell. See purescript/purescript-arrays#102