Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
We're built different...
as the name of the tests imply, your solution has to be reusable, i.e.
invoke()
should behave correctly when called several times on the sameLazy
objectThis comment is hidden because it contains spoiler information about the solution
yeah, i believe i'm talking about the same one just above. noone cares
I believe one of the test cases might be wrong. Test Reuse lazy
filterNumbers + filterRange + max function, 2nd one.
My function passes every one except for this one, here are the results
for each stage:
[Function: filterNumbers] arguments - [ 1, '3', [ 2 ], {}, 4, 2, 1, 8,
6, [], '7', -1, { v: 5 }, 4 ] result - [ 1, 4, 2, 1, 8, 6, -1, 4 ],
[Function: filterRange] arguments - [ 1, 3, 1, 4, 2, 1, 4, 2, 1, 8, 6,
-1, 4 ] result [ 1, 2, 1, 2, 1 ],
[Function: max] arguments - [ 1, 2, 1, 2, 1, 2, 1 ] result 2
Everything seems correct but for some reason the expected output in the last one is 1,
not 2. Might there be a mistake here?