Bind: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com") |
(I'm guessing g was meant here, though it makes little difference.) |
||
Line 1: | Line 1: | ||
{{Built-in|Bind|∘}} is a [[primitive operator]]. It shares the glyph [[Jot]] (<source lang=apl inline>∘</source>) with [[Beside]]; in many dialects the two operators share the name [[Compose]]. Its [[derived function]]s can only be called monadically. | {{Built-in|Bind|∘}} is a [[primitive operator]]. It shares the glyph [[Jot]] (<source lang=apl inline>∘</source>) with [[Beside]]; in many dialects the two operators share the name [[Compose]]. Its [[derived function]]s can only be called monadically. | ||
Called with an array left operand <source lang=apl inline>A</source> and function right operand <source lang=apl inline>g</source>, <source lang=apl inline>( | Called with an array left operand <source lang=apl inline>A</source> and function right operand <source lang=apl inline>g</source>, <source lang=apl inline>(A∘g) X</source> is equivalent to <source lang=apl inline>A g X</source>. | ||
Called with a function left operand <source lang=apl inline>f</source> and array right operand <source lang=apl inline>B</source>, <source lang=apl inline>(f∘B) X</source> is equivalent to <source lang=apl inline>X f B</source>. | Called with a function left operand <source lang=apl inline>f</source> and array right operand <source lang=apl inline>B</source>, <source lang=apl inline>(f∘B) X</source> is equivalent to <source lang=apl inline>X f B</source>. |
Revision as of 08:35, 26 March 2022
∘
|
Bind (∘
) is a primitive operator. It shares the glyph Jot (∘
) with Beside; in many dialects the two operators share the name Compose. Its derived functions can only be called monadically.
Called with an array left operand A
and function right operand g
, (A∘g) X
is equivalent to A g X
.
Called with a function left operand f
and array right operand B
, (f∘B) X
is equivalent to X f B
.
Common usage
Bind is used to create a derived function with a single constant argument, particularly in tacit programming:
Inc←+∘1 Inc 1 2 3 2 3 4
External links
Lessons
Documentation