Compute the average of a list of things.
ts.reduce((acc, t) => acc + map(t), 0) / ts.length Copy
ts.reduce((acc, t) => acc + map(t), 0) / ts.length
But also works with generators.
list of things
function to convert a thing to number
the average or 0 if ts is empty
Generated using TypeDoc
Compute the average of a list of things.
But also works with generators.