Difference between revisions of "Bind"

From APL Wiki
Jump to navigation Jump to search
m (Text replacement - "http://help.dyalog.com" to "https://help.dyalog.com")
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Built-in|Bind|∘}} is a [[primitive operator]]. It shares the glyph <source lang=apl inline>∘</source> with [[Beside]]. It's [[derived function]]s can only be called monadically.
+
{{Built-in|Bind|∘}} is a [[primitive operator]]. It shares the glyph [[Jot]] (<source lang=apl inline>∘</source>) with [[Beside]]; in many dialects the two operators share the name [[Compose]]. Its [[derived function]]s can only be called monadically.
  
 
Called with an array left operand <source lang=apl inline>A</source> and function right operand <source lang=apl inline>g</source>, <source lang=apl inline>(A∘f) X</source> is equivalent to <source lang=apl inline>A f X</source>.
 
Called with an array left operand <source lang=apl inline>A</source> and function right operand <source lang=apl inline>g</source>, <source lang=apl inline>(A∘f) X</source> is equivalent to <source lang=apl inline>A f X</source>.
Line 19: Line 19:
  
 
=== Documentation ===
 
=== Documentation ===
* [http://help.dyalog.com/18.0/#Language/Primitive%20Operators/Bind.htm Dyalog]
+
* [https://help.dyalog.com/18.0/#Language/Primitive%20Operators/Bind.htm Dyalog]
  
  
{{APL built-ins}}
+
{{APL built-ins}}[[Category:Primitive operators]][[Category:Composition operators]]

Latest revision as of 14:26, 14 July 2020

Bind () is a primitive operator. It shares the glyph Jot () with Beside; in many dialects the two operators share the name Compose. Its derived functions can only be called monadically.

Called with an array left operand A and function right operand g, (Af) X is equivalent to A f X.

Called with a function left operand f and array right operand B, (fB) X is equivalent to X f B.

Common usage

Bind is used to create a derived function with a single constant argument, particularly in tacit programming:

Try it online!

      Inc+1
      Inc 1 2 3
2 3 4

External links

Lessons

Documentation


APL built-ins [edit]
Primitive functions
Scalar
Monadic ConjugateNegateSignumReciprocalMagnitudeExponentialNatural LogarithmFloorCeilingFactorialNotPi TimesRollTypeImaginarySquare Root
Dyadic AddSubtractTimesDivideResiduePowerLogarithmMinimumMaximumBinomialComparison functionsBoolean functions (And, Or, Nand, Nor) ∙ GCDLCMCircularComplexRoot
Non-Scalar
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, Atop, Over) ∙ Inner ProductPowerAtUnderRankDepthVariantStencilCut (J)
Quad names
Arrays Index originMigration levelAtomic vector
Functions Case convertUnicode convert
Operators SearchReplace