Function composition: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 1: Line 1:
'''Function composition''' refers to the "gluing" together of two [[function]]s using a [[dyadic operator]] such that the functions are applied to the [[argument]](s) as normal, but in a particular pattern specific the the used [[operator]]. The term [[wikipedia:function composition|function composition]] comes from [[traditional mathematics]] where it is used for a function <math>h(x)=f(g(x))</math> when written as <math> h(x) = (f \circ g)(x)</math>. APL generalises this idea to [[dyadic function]]s, allowing various patterns of application in addition to the simple application of one [[monadic function]] to the result of another monadic function. The three main patterns, represented by [[Atop]], [[Beside]], and [[Over]] can be visualised as follows:
'''Function composition''' refers to the "gluing" together of two [[function]]s using a [[dyadic operator]] such that the functions are applied to the [[argument]](s) as normal, but in a particular pattern specific the the used [[operator]]. The term [[wikipedia:function composition|function composition]] comes from [[traditional mathematics]] where it is used for a function <math>h(x)=f(g(x))</math> when written as <math> h(x) = (f \circ g)(x)</math>. APL generalises this idea to [[dyadic function]]s, allowing various patterns of application in addition to the simple application of one [[monadic function]] to the result of another monadic function. The three main patterns, represented by [[Atop]], [[Beside]], and [[Over]] can be visualised as follows:


:[[File:Compositions.png|frameless]]
:[[File:Compositions.png|frameless|497px]]
When any of these are applied monadically, the dotted branch falls away, and they are all equivalent to each other and to <math>(f \circ g)(x)</math> of traditional mathematics.
When any of these are applied monadically, the dotted branch falls away, and they are all equivalent to each other and to <math>(f \circ g)(x)</math> of traditional mathematics.


Navigation menu