Top 1,000 Features Creators Resources Blog Explorer Download
GitHub icon

Function Composition

< >
Example from 1 languages: undefined
function o(f, g) { return function(x) { return f(g(x)); } }
Example from 1 languages: undefined
// 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: undefined
foo = f . g
Example from 1 languages: undefined
foo←f∘g
Example from 1 languages: undefined
(f..g..h)(x, y, z)
Example from 1 languages: undefined
my &foo = &f ∘ &g;
Example from 1 languages: undefined
/+∘α(bu + 1):<1,2,3,4,5,6,7,8,9,10>
*

Languages with Function Composition include JavaScript, C#, Haskell, APL, Coconut, 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 · About · Acknowledgements · Extensions · Day 631 · Donate · feedback@pldb.io