← Back to context

Comment by 1-more

8 hours ago

> I love explaining +/%#

Based on the one thing I remember in APL I'm guessing the first two characters are "sum over some data structure" and the data structure is what the next two mean. What does it mean entirely?

avg=: +/ % #

+/ sums the items of the array.

# counts the number of items in the array.

% divides the sum by the number of items.