Simple currifying of JavaScript functions