Split composition: Difference between revisions

Jump to navigation Jump to search
293 bytes added ,  13:56, 12 April 2022
Use in I
(Editing; use source blocks)
(Use in I)
Line 1: Line 1:
'''Split-compose''' is a point-free construct, used to pre-process its argument(s) with the left and right-most operand before applying the middle operand between the result.
'''Split-compose''' is a point-free construct, used to pre-process its argument(s) with the left and right-most operand before applying the middle operand between the result. The name was introduced by the [[I|I language]], where it's represented with <code>O</code>, a higher-order function that applies first to the middle function and then the two outer functions (<code>O</code> also represents the [[Over]] operator). It doesn't appear as a primitive in any APL.


Given functions <source lang=apl inline>F</source>, <source lang=apl inline>G</source>, and <source lang=apl inline>H</source>, the split composition on arguments <source lang=apl inline>x</source> and <source lang=apl inline>y</source> is defined as <source lang=apl inline>(F x) G (H y)</source>.
Given functions <source lang=apl inline>F</source>, <source lang=apl inline>G</source>, and <source lang=apl inline>H</source>, the split composition on arguments <source lang=apl inline>x</source> and <source lang=apl inline>y</source> is defined as <source lang=apl inline>(F x) G (H y)</source>.

Navigation menu