rmurphey / js-assessment-answers

125 stars 84 forks source link

Why require argument count of 1 in curryIt problem #101

Open sang4lv opened 8 years ago

sang4lv commented 8 years ago

I'm wondering if there is any significance of having the returned function to have an argument count of 1.

I worked out a simple solution in 6 lines, which contains returning an already bound function. Since the bound function would have an argument length of 0, the test didn't pass.

rmurphey commented 8 years ago

It's been a while since I looked at this, but I think you're right that checking for the argument count doesn't necessarily make sense; feel free to submit your solution as a pull request here!

sang4lv commented 8 years ago

I'd like to do that, but I would need to modify the test case first. Would you consider accept a pull request to modify js-assessment test case?