New Constructs: Tally with Key I Index   <<   >>


{≢⍵}⌸y 2.5-3

  # of occurrences of unique elements of  x←?1e6⍴1000
a.   ¯1+{≢⍵}⌸(⍳1000),x   1.00
b.   ¯1+{≢⍵}⌸(⍳1+⌈/x),x 1.62
c.   c ⊣ c[x]+←1 ⊣ c←1000⍴0 2.62
d.   t-¯1↓¯1,t←(s≠1↓s,¯1)/⍳⍴s 1.81
e.   -2-/¯1,(s≠1↓s,¯1)/⍳⍴s 1.81
f.   -2-/¯1,(s≠1↓s,¯1)/⍳⍴s←{⍵[⍋⍵]}x 2.93
g.   -2-/¯1,(s≠1↓s,¯1)/⍳⍴s←x[⍋x] 9.13
h.   +/(⍳1000)∘.=x 778.66