-
Notifications
You must be signed in to change notification settings - Fork 69
Add partition
to Data.Array
#59
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
Conversation
Interestingly enough this seems to break in a line that I didn't touch. I'm not familiar with the tools complaining here so I'm not sure if this is actually my mistake, it certainly looks like it isn't to me. |
Ugh, it's not you, jshint broke something a while ago. Can you change this line to I'm also amazed we don't already have |
Good to know :) So was I ^^. |
All fixed now. |
-- | and one for values that don't. | ||
foreign import partition :: forall a. (a -> Boolean) | ||
-> Array a | ||
-> { yes :: Array a, no :: Array a } |
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.
I like the return type, I frequently have to consult Hackage to remember the right way round in Haskell for things like this.
👍 LGTM, but could you please run |
On its way. The output surprised me however. I looks like it touched more of the documentation than I actually changed. |
It looks like we forgot to build it last time something was merged. Looks good, thanks! |
Looks good to me, too. |
Thanks @raichoo! |
I needed a
partition
function for Arrays so I made one. Pointers welcome, this currently feels like the straightforward way to implement it.