Over

From APL Wiki
Revision as of 12:33, 9 September 2021 by Hou32hou (talk | contribs) (Created page with "{{Built-in|Over|<nowiki>⍥</nowiki>}} is a dyadic operator which takes two functions and produce a function (<source lang=apl inline>⍥</source>). == Explanati...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Over () is a dyadic operator which takes two functions and produce a function ().

Explanation

When the resulting function is used monadically, it is the same as Atop.

  (g ⍥ h) ⍵
g (h ⍵)

When the resulting function is used dyadically, then it forms an Over expression (which is the true purpose of this operator).

⍺ (g ⍥ h) ⍵
(h ⍺) g (h ⍵)

Examples

      x←1 2 3
      y←4 5 6
     x +⍥(⌈/) y ⍝ add the max of x and max of y
9
      ⍝ same as
      (⌈/x)+⌈/y
9