[next][previous][up][top][index]
search for:

tally -- tally the elements of a list

tally x -- tallies the frequencies of items in a list x.

It produces an hash table (multiset) y which tallies the frequencies of occurrences of items in the list x, i.e., y_i is the number of times i appears in x, or is 0 if i doesn't appear in the list.

i1 : y = tally {1,2,3,a,b,1,2,a,1,2,{a,b},{a,b},a}

o1 = Tally{{a, b} => 2}
           1 => 3
           2 => 3
           3 => 1
           a => 3
           b => 1

o1 : Tally
i2 : y_{a,b}

o2 = 2

See also:

  • Tally -- the class of all tally results
  • Ways to use tally :

  • tally Sequence
  • tally List

  • [next][previous][up][top][index]
    search for: