Function composition: Difference between revisions

Jump to navigation Jump to search
34 bytes removed ,  06:51, 1 July 2022
no edit summary
(Add Reverse Compose to main forms)
No edit summary
Line 1: Line 1:
'''Function composition''' refers to the "gluing" together of two or more [[function]]s using a [[dyadic operator]] or a [[train]] such that the functions are applied to the [[argument]](s) as normal, but in a particular pattern specific to 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.
'''Function composition''' refers to the "gluing" together of two or more [[function]]s using a [[dyadic operator]] or a [[train]] such that the functions are applied to the [[argument]](s) as normal, but in a particular pattern. 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.
== Common compositions ==
== Common compositions ==
[[Reverse Compose]] and [[Beside]] treat their arguments in an asymmetric way. Their patterns can be visualised as follows:
[[Reverse Compose]] and [[Beside]] treat their arguments in an asymmetric way. Their patterns can be visualised as follows:

Navigation menu