Array.buckets()

From ZCubes Wiki
Revision as of 07:22, 13 February 2020 by Devika (talk | contribs) (→‎Buckets)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Buckets

  • 1..10.buckets() returns an object with key frequency pairs.
"1": 1,
"2": 1,
"3": 1,
"4": 1,
"5": 1,
"6": 1,
"7": 1,
"8": 1,
"9": 1,
"10": 1,
  • a=1..10.fillwith(1..3).buckets()
"1": 4,
"2": 3,
"3": 3,
  • a=1..10.fillwith(1..3).buckets();

b=FLATTENOBJECT(a);

1 4
2 3
3 3

See Also