Stop

From APL Wiki
Jump to navigation Jump to search

Stop () (in SHARP APL and APLX), Hide (in GNU APL and Kap), or Null (in A+) is a primitive monadic function that ignores its argument and returns a non-printing value. It shares the left tack glyph with Left Identity. The nature of the returned value can vary: for example an empty matrix is used in SAX and APLX, while GNU APL uses the scalar 0 but returns it as a shy result (or "committed"). In SHARP APL's initial implementation of , Stop returned "no result", so that attempting to use its result would be an error.[1]

In other dialects, monadic is the identity function, exactly like . This redundancy means that it can be redefined without losing any primitive functionality. However, pairing both dyadic functions with the identity may be useful in constructing ambivalent functions, particularly in tacit programming. In April, monadic ("Empty") returns its argument is returned as a shy result, giving it the properties of both Stop and the identity.

In dialects where does not return the argument when used monadically, the effect can be achieved with ⊢⍨ using the commute operator.

Documentation

References

  1. "Language Extensions of May 1983". SATN-45, 1983-05-02.
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