mean := proc( a :: indexable ) local i; Normalizer( add( i, i in a ) / numelems( a ) ) end proc: