of a variadic compositional operator. (define (compose . fs) (if (null? fs) (lambda (x) x) ; if no argument is given, evaluates to the identity function (lambda (x) ((car fs) ((apply compose (cdr fs)) x))))) ; examples (define (add-a-bang str) (string-append str "!")) (define givebang (compose string->symbol add-a-bang symbol->string)) (givebang 'set) ; ===> set! ; anonymous composition ((compose sqrt negate square) 5) ; ===> 0+5i APL Many dialects of APL feature built in function composition using the symbol ∘. This higher-order function extends function composition to dyadic application of the left side function such that A f∘g B is A f g B. foo←f∘g Additionally, you can define function composition: o←{⍺⍺ ⍵⍵ ⍵} In dialect that does not support inline definition using braces, the traditional definition is available: ∇ r←(f o g)x r←f g x ∇ Raku Raku like Haskell has a built in function composition operator, the main difference is it is spelled as ∘ or o. my &foo = &f ∘ &g; Also like Haskell you could define the operator yourself. In fact the following is the Raku code used to define it in the Rakudo implementation. # the implementation has a slightly different line here because it cheats proto sub infix:<∘> (&?, &?) is equiv(&[~]) is assoc<left> {*} multi sub infix:<∘> () { *.self } # allows `[∘] @array` to work when `@array` is empty multi sub infix:<∘> (&f) { &f } # allows `[∘] @array` to work when `@array` has one element multi sub infix:<∘> (&f, &g --> Block) { (&f).count > 1 ?? -> |args { f |g |args } !! -> |args { f g |args } } # alias it to the "Texas" spelling ( everything is bigger, and ASCII in Texas ) my &infix:<o> := &infix:<∘>; Python In Python, a way to define the composition for any group of functions, is using reduce function (use functools.reduce in Python 3): # Available since Python v2.6 from functools import reduce def compose(*funcs) -> int: """Compose a group of functions (f(g(h(...)))) into a single composite func.""" return reduce(lambda f, g: lambda x: f(g(x)), funcs) # Example f = lambda x: x + 1 g = lambda x: x * 2 h = lambda x: x - 3 # Call the function x=10 : ((x-3)*2)+1 = 15 print(compose(f, g, h)(10)) JavaScript In JavaScript we can define it as a function which takes two functions f and