Beside: Difference between revisions

Jump to navigation Jump to search
443 bytes added ,  08:54, 6 September 2021
m
Added examples
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com")
m (Added examples)
Line 2: Line 2:


In usage, <source lang=apl inline>X f∘g Y</source> is equivalent to <source lang=apl inline>X f g Y</source>, and <source lang=apl inline>f∘g Y</source> is equivalent to <source lang=apl inline>f g Y</source>. Thus, beside can be defined as the [[dop]] <source lang=apl inline>{⍺←⊢ ⋄ ⍺ ⍺⍺ ⍵⍵ ⍵}</source>.
In usage, <source lang=apl inline>X f∘g Y</source> is equivalent to <source lang=apl inline>X f g Y</source>, and <source lang=apl inline>f∘g Y</source> is equivalent to <source lang=apl inline>f g Y</source>. Thus, beside can be defined as the [[dop]] <source lang=apl inline>{⍺←⊢ ⋄ ⍺ ⍺⍺ ⍵⍵ ⍵}</source>.
== Examples ==
When use [[monadic]]ally, <source lang=apl inline>f∘g</source> behaves the same as [https://en.wikipedia.org/wiki/Function_composition function compositian].
<source lang=apl>
      -∘÷ 2
¯0.5
      ⍝ same as
      -(÷2)
¯0.5
</source>
When use [[dyadic]]ally, <source lang=apl inline>f∘g</source> forms a [[Hook]].
<source lang=apl>
      'oy'≡∘⌽'yo'
1
      ⍝ same as
      'oy'≡⌽'yo'
1
</source>


== External links ==
== External links ==
24

edits

Navigation menu