Atop (operator)

From APL Wiki
Revision as of 08:40, 22 November 2021 by Adám Brudzewsky (talk | contribs) (Created page with "{{Built-in|Atop|⍤}} is a primitive dyadic operator which takes two function operands and produces a derived function which uses the le...")
(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.

Atop () is a primitive dyadic operator which takes two function operands and produces a derived function which uses the left operand monadically to post-processes the result of the ambivalent right operand.

Explanation

When the resulting function is used monadically, it has the same behaviour as if the Atop 2-train or any of the Beside or Over operators had been used:

  (g ⍤ h) ⍵
g (h ⍵)

When the resulting function is used dyadically, the result is post-processed:

⍺ (g ⍤ h) ⍵
g ⍺ h ⍵)

Examples

      x←3 1 2
      y←4 6 5
      x -⍤⌈ y ⍝ the negation of the max of x y
¯4 ¯6 ¯5
      ⍝ same as
      -x⌈y
¯4 ¯6 ¯5

External links

Lessons

Documentation

APL built-ins [edit]
Primitives (Timeline) Functions
Scalar
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare Root
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
Non-Scalar
Structural ShapeReshapeTallyDepthRavelEnlistTableCatenateReverseRotateTransposeRazeMixSplitEncloseNestCut (K)PairLinkPartitioned EnclosePartition
Selection FirstPickTakeDropUniqueIdentityStopSelectReplicateExpandSet functions (IntersectionUnionWithout) ∙ Bracket indexingIndexCartesian ProductSort
Selector Index generatorGradeIndex OfInterval IndexIndicesDealPrefix and suffix vectors
Computational MatchNot MatchMembershipFindNub SieveEncodeDecodeMatrix InverseMatrix DivideFormatExecuteMaterialiseRange
Operators Monadic EachCommuteConstantReplicateExpandReduceWindowed ReduceScanOuter ProductKeyI-BeamSpawnFunction axis
Dyadic BindCompositions (Compose, Reverse Compose, Beside, Withe, Atop, Over) ∙ Inner ProductDeterminantPowerAtUnderRankDepthVariantStencilCutDirect definition (operator)
Quad names Index originComparison toleranceMigration levelAtomic vector