kolodny / exercises

Some basic javascript coding challenges and interview questions
4.23k stars 672 forks source link

Adding test for curry, so it will also work with a single argument. #19

Closed danrevah closed 9 years ago

danrevah commented 9 years ago

test for the curry exercise for testing with a single argument, which could be easy forgotten when trying to save the state between curry calls.

for example if one will use the approach that the first call will create a new scope and return a function, this will work with the old tests, but not with the one i've added.

for ex:

function curry() {
    return function(input) { 
        // .. 
    }
}
kolodny commented 9 years ago

Thanks