function o(f, g) {
return function(x) {
return f(g(x));
}
}
// Call example:
// var c = Compose(f, g);
//
// Func<int, bool> g = _ => ...
// Func<bool, string> f = _ => ...
Func<TIn, TOut> Compose<TIn, TMid, TOut>(Func<TMid, TOut> f, Func<TIn, TMid> g) => _ => f(g(_));
foo = f . g
foo←f∘g
(f..g..h)(x, y, z)
on o f g do
on _ x do f[g[x]] end
end
my &foo = &f ∘ &g;
/+∘α(bu + 1):<1,2,3,4,5,6,7,8,9,10>
Languages with Function Composition include JavaScript, C#, Haskell, APL, Coconut, Lil, Raku, fp
Languages without Function Composition include C3
View all concepts with or missing a hasFunctionComposition measurement
Read more about Function Composition on the web: 1.