Group (K): Difference between revisions

Jump to navigation Jump to search
m
No need for hatnote now the title is disambiguated
(Fix explanation for why K3 group doesn't return a dictionary)
m (No need for hatnote now the title is disambiguated)
 
Line 1: Line 1:
:''This page is about the K primitive that returns a dictionary. For the primitive that returns an array introduced by BQN, see [[Group (BQN)]].''
{{Built-in|Group|<nowiki>=</nowiki>}} is a [[monadic function]] in [[K]] that returns a [[dictionary]] whose keys are the [[unique]] values in its argument and whose value for a given key is the list of indices where it appears. In versions before K4, which allowed dictionaries with arbitrary keys, Group returns only an array of the index lists, and the keys must be obtained separately.
{{Built-in|Group|<nowiki>=</nowiki>}} is a [[monadic function]] in [[K]] that returns a [[dictionary]] whose keys are the [[unique]] values in its argument and whose value for a given key is the list of indices where it appears. In versions before K4, which allowed dictionaries with arbitrary keys, Group returns only an array of the index lists, and the keys must be obtained separately.


Navigation menu