Difference between revisions of "Over"

From APL Wiki
Jump to navigation Jump to search
(direct link)
Line 2: Line 2:
== Explanation ==
== Explanation ==
When the resulting function is used [[monadic]]ally, it has the same behaviour as if the [[Beside]] or [[Atop operator]] had been used:
When the resulting function is used [[monadic]]ally, it has the same behaviour as if the [[Beside]] or [[Atop (operator)|Atop]] operator had been used:
|<source lang=apl>  (g ⍥ h) ⍵</source>|| {{←→}} ||<source lang=apl>g (h ⍵)</source>
|<source lang=apl>  (g ⍥ h) ⍵</source>|| {{←→}} ||<source lang=apl>g (h ⍵)</source>

Latest revision as of 08:41, 22 November 2021

Over () is a primitive dyadic operator which takes two function operands and produces a derived function which pre-processes the argument(s) using the monadic right operand, before applying the left operand on/between the result(s).


When the resulting function is used monadically, it has the same behaviour as if the Beside or Atop operator had been used:

  (g  h) 
g (h )

When the resulting function is used dyadically, both arguments are pre-processed:

 (g  h) 
(h ) g (h )


      x3 1 2
      y4 6 5
      x +(/) y ⍝ add the max of x and max of y
      ⍝ same as

External links



APL built-ins [edit]
Primitive functions
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare Root
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
Structural ShapeReshapeTallyDepthRavelEnlistTableCatenateReverseRotateTransposeRazeMixSplitEncloseNestCut (K)PairLinkPartitioned EnclosePartition
Selection FirstPickTakeDropUniqueIdentitySelectReplicateExpandSet functions (IntersectionUnionWithout) ∙ Bracket indexingIndex
Selector Index generatorGradeIndex OfInterval IndexIndicesDeal
Computational MatchNot MatchMembershipFindNub SieveEncodeDecodeMatrix InverseMatrix DivideFormatExecuteMaterialiseRange
Primitive operators Monadic EachCommuteConstantReplicateExpandReduceWindowed ReduceScanOuter ProductKeyI-beamSpawnFunction axis
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductPowerAtUnderRankDepthVariantStencilCut (J)
Quad names
Arrays Index originMigration levelAtomic vector
Functions Name classCase convertUnicode convert
Operators SearchReplace