Functors, then it makes sense that
containswould work on them as well, since they should also be
containscan be written in terms of
R.adjust(R.always(x)was the closest I found
Left(errorObject): https://gist.github.com/gilligan/66a1ac0431a0e77fdaae - this is not quite right. Can anyone help out ?
(b -> b -> c) -> (a -> b) -> a -> a -> cit almost writes itself.
const on = curry((f, g, x, y) => f(g(x), g(y)));
c, you only have one place to get it, the
ffunction. Well, the
ffunction needs two values of type
b, and you can only get those from the
gfunction needs a value of type
a, and you have two of those:
y. So you be fair and send both values
g, then send that to
f, and your function wrote itself.