Indices: Difference between revisions

Jump to navigation Jump to search
25 bytes removed ,  16:56, 11 December 2019
no edit summary
No edit summary
Line 3: Line 3:
{{Built-in|Indices|⍸}}, or '''Where''', is a [[monadic]] [[primitive function]] which returns the [[Index|indices]] of all ones in a [[Boolean]] array. More generally, Indices accepts an array of non-negative integers and copies each index the corresponding number of times.
{{Built-in|Indices|⍸}}, or '''Where''', is a [[monadic]] [[primitive function]] which returns the [[Index|indices]] of all ones in a [[Boolean]] array. More generally, Indices accepts an array of non-negative integers and copies each index the corresponding number of times.


Where on a Boolean argument was introduced in [[K]] as <source lang=k inline>&</source>, and it was extended to non-negative integers in [[J]], with the name Indices (<source lang=j inline>I.</source>).
In [[K]], the first language to include the primitive, it is called Where (<source lang=k inline>&</source>). In [[J]], it is called Indices (<source lang=j inline>I.</source>).


== Examples ==
== Examples ==

Navigation menu