Skip to content

Commit 513323b

Browse files
committed
function composition
1 parent a0ea2db commit 513323b

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

source_md/higher-order-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ ghci> map ($ 3) [(4+), (10*), (^2), sqrt]
865865

866866
## Function composition {#composition}
867867

868-
In mathematics, function composition is defined like this: ![ (f . g)(x) = f(g(x))](assets/images/higher-order-functions/composition.png), meaning that composing two functions produces a new function that, when called with a parameter, say, *x* is the equivalent of calling *g* with the parameter *x* and then calling the *f* with that result.
868+
In mathematics, function composition is defined like this: $\left( f \circ g \right) (x) = f \left( g(x) \right)$, meaning that composing two functions produces a new function that, when called with an argument, say, $x$ is the equivalent of calling $g$ with the argument $x$ and then calling the $f$ with that result.
869869

870870
In Haskell, function composition is pretty much the same thing.
871871
We do function composition with the `.` function, which is defined like so:
-702 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)