apply(Tally,Function)

apply(x,f) -- applies the function f to each element of the tally x , accumulating the results in a tally.

     i1 = x = tally {-1,-1,-2,1}
     
     o1 = tally {1 : 1, 1 : -2, 2 : -1}
     
     o1 : Tally
     
     i2 = apply(x,abs)
     
     o2 = tally {3 : 1, 1 : 2}
     
     o2 : Tally
     

See also Tally and tally.

Go to main index.

Go to concepts index.