Re:Haskell in Production
by herbstein on Thursday October 17, 2019 @06:22PM
(#21286885)
> Does (g ∘ f)(x) mean g(f(x)) or f(g(x))?
The function composition operator can be vocalized as, in this case, "g after f". That is, apply the f and then g. Translating '∘' into 'after' is the easiest way to understand it.
Re:Haskell in Production
by phlakaton on Thursday October 17, 2019 @11:58PM
(#21288541)
Haskell provides the (g . f) notation as the standard, and also has (f >>> g) notation buried in one of its more advanced libraries if anyone finds the right-to-left reading too disorienting.
The function composition operator can be vocalized as, in this case, "g after f". That is, apply the f and then g. Translating '∘' into 'after' is the easiest way to understand it.