api = new Api('http://my.cool.api')
// connect = rootUrl => method => endpoint
api = connect('http://my.cool.api')
get = api('GET')
post = api('POST')
E.g. `sumList = reduce(sum)`
It has a variety of drawbacks though, like being harder to inspect at runtime, and arguably harder to read.
In it the timeout function only takes one arg for its timeout wrapped function, so how do we use functions with more than 1 arg? Via currying
Uncurried: \xs -> map (\x -> f (fst x)) xs
Now comparing this to js would just be unfair (edit: ES6 lambdas are probably ok).