Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • The Example Tests will not run without function add(). I've added that.

    You should really not use Test.expect when Test.assertEquals will work.

    And this is an exact copy of YACK (Yet Another Currying Kata) from 2015 (approved) and Currying vs. Partial Application from 2014 (still in beta).

    If you want to plug London's curry, please find a more original way. This one has been done.

    I suggest you do not burden CodeWars with this duplicate triplicate kata, and unpublish it.

  • A couple obvious issues here with my own solution. First is that by using reduce I'm not actually breaking out the loop when I detect a closing paren that came before an open paren. This means the the code will run longer than necessary. Also, because I used an arbitrarily large number '100000' to handle this situation, there is the SLIGHT possibility that I could get a false positive.