Fix for curry

I was experiencing an issue where curry would go into an infinite loop so I looked up the wu.js implementation and updated this one to match.