Skip to content

clojure.core/comp

View this page on ClojureDocs

Type: function Added: Clojure 1.0 Examples: 18 Runnable: 15
([] [f] [f g] [f g & fs])

Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable number of args, applies the rightmost of fns to the args, the next fn (right-to-left) to the result, etc.

Examples

by citizen428 on
by zpinter on
by semperos on
by MrHus on
by yasuto on . May have evaluation errors.
by shockbob on . May have evaluation errors.
by Will on
by phreed on
by purukaushik on
by bsifou on
by merliecat on
by elect000 on
by phreed on
by ibercode on
by ibercode on
by Jjunior130 on . May have evaluation errors.
by luontola on
by nbardiuk on

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.