Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Function Composition

< >
Example from 1 languages: JavaScript
function o(f, g) { return function(x) { return f(g(x)); } }
Example from 1 languages: C#
// 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(_));
Example from 1 languages: Haskell
foo = f . g
Example from 1 languages: APL
foo←f∘g
Example from 1 languages: Coconut
(f..g..h)(x, y, z)
Example from 1 languages: Lil
on o f g do on _ x do f[g[x]] end end
Example from 1 languages: Raku
my &foo = &f ∘ &g;
Example from 1 languages: fp
/+∘α(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.

View source
- Build the next great programming language · Add · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements · Part of the World Wide Scroll