# Haskell N-Ary Composition ## Metadata **Status**:: #x **Zettel**:: #zettel/fleeting **Created**:: [[2026-02-07]] ## Synopsis ```haskell ary1 = (+1) ary2 = (+) ary3 a b c = a + b + c negate . ary1 $ 1 (negate . ary1) 1 (.) negate ary 1 negate . ary2 1 $ 2 ((.) negate . ary2) 1 2 ((.) . (.)) negate ary2 1 2 negate . ary3 1 2 $ 3 ((.) ((.) negate) . ary3) 1 2 3 ((.) . (.) . (.)) negate ary3 1 2 3 ``` One extra `(.)` around `negate` pushes an argument to the right side function of the composition. ``` ((.) . ... . (.)) g h a1 ... am ... an \---------------/ repeat m times -- pushes m args into `h` g (h a1 ... am) ... an ```