4 ms·
> 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. T
by herbstein 7y ago
> 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.
- chrisdirkis 7y agoAlternatively, I learnt it as "of" (from a mathematical standpoint). "(g ∘ f)(x) " is "g of f of x", so g(f(x))
- phlakaton 7y agoHaskell 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.