I’ve been using this for a little over a month now and have really enjoyed it.
Could you describe
f <. g <~. hmore. What is done first, left or right. What happens when the first operator is applied
<~.are both right-associative with the same precedence, so this is how you would transform it step by step
f <. g <~. h (f <. g) <~. h (\z -> f (g z)) <~. h \x y -> (\z -> f (g z)) x (h y) \x y -> f (g x) (h y)
But an easier way to think about it is to use the symbols.
f <. g means make a new function consisting of
g being applied to the first argument of
f <~. g mean make a new (at least) two argument function where the first argument is passed to
f unaltered, and the second argument is passed to
f after first having
g applied to it. So when you combine them,
f <. g <~. h becomes "take
g to it’s first argument and apply
h to its second argument.
- personally I find
- I don’t like how
>>>are both right-associative
- it’s the natural operator for normal composition when using the generalization I’m using (what comes next?
- it’s kinda like haskell’s
.but can be used in both directions