Ad
  • Custom User Avatar

    I see it now. Thanks for the clarification!

  • Custom User Avatar

    If I call [1,2,3].reduce( f, nil ) it should do f( f( f(nil, 1), 2), 3) - Your function seems to treat nil as the test for an undefined starting point, but that shouldn't be the case.

    For [1,2,3].reduce( f, nil ):

    • My solution: f.( f.( f.( nil, 1), 2), 3)
    • Your solution:f.( f.( 1, 2), 3)
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution