Index (function): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
:''This article describes a dyadic primitive function that performs indexing into an array. For the concept of array indices, see [[Index]]. For the concept of extracting items from an array, see [[Indexing]].'' | :''This article describes a dyadic primitive function that performs indexing into an array. For the concept of array indices, see [[Index]]. For the concept of extracting items from an array, see [[Indexing]].'' | ||
{{Built-in|Index|⌷}}, also called '''Squad Indexing''' after the name of the [[glyph]], is a [[dyadic]] [[primitive function]]. The result of <source lang=apl inline>X⌷Y</source> is an array formed with items of Y extracted by the [[index]] specification X. | {{Built-in|Index|⌷}}, also called '''Squad Indexing''' after the name of the [[glyph]], is a [[dyadic]] [[primitive function]]. The result of <source lang=apl inline>X⌷Y</source> is an array formed with items of Y extracted by the [[index]] specification X. Index is a proper [[function]] alternative to a mode of [[bracket indexing]] (which uses a dedicated syntax <source lang=apl inline>Y[X]</source>), making it usable within [[tacit programming]]. It shares its glyph with the monadic [[Materialise]] function. | ||
== Examples == | == Examples == |