Closed notxcain closed 6 years ago
I've thought filter
is select
, since takeWhile
stops when the first NO
occurs.
Btw, the test is using reject
instead of filter
:smile:
Yep, it is select
and not takeWith
.
@neilco take a look at another it()'s. The are composed the same way.
@mneorr Filter operation is from RAC, Rx and Scala. So I thought it would be more familiar. I did't even notice select operation.
How is the status on this? I'd love to have fold ;)
If a fold is implemented, I will switch from https://github.com/leuchtetgruen/Functional.m to use ObjectiveSugar!
There's already a method for NSArray that performs the exact same job as the
filter
method in this pull request. It's calledtakeWhile
(sharing the name with Ruby'stake_while
).foldLeft:reduce:
looks interesting. Could you provide a couple of more tests with different use cases? Also, can you fix the test description?should simply be