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.
If I call
[1,2,3].reduce( f, nil )
it should dof( f( f(nil, 1), 2), 3)
- Your function seems to treatnil
as the test for an undefined starting point, but that shouldn't be the case.For
[1,2,3].reduce( f, nil )
:f.( f.( f.( nil, 1), 2), 3)
f.( f.( 1, 2), 3)