method number.average
Contract
Return typedouble
No input parameters.
Parameter kindDefault valueType
Other unkeyed argumentsopt
Other keyed argumentsopt
Water Contract
<method number.average
  _other_keyed=opt=wob=ekind.code="_add_to_environment"
  _other_unkeyed=opt=wob=ekind.code="_body"
  _return_type=number.double/>

Return the average of the number-valued arguments as a double. This is also called the arithmetic mean. It is the sum of the numbers divided by the number of numbers supplied. The subject can either be a number, or the 'number' class itself.
2.<average 3/>2.5
number.<average 3 4 5/>4.0
2.<average 3 4 5/>3.5
number.<average _other_unkeyed=<v 5 6 7 8 9/>/>
7.0

You can also pass in other keyed args instead of unkeyed args.
number.<average x=2 y=5/>3.5

This is probably more useful when you have a record that has fields who's keys are strings but who's values are numbers:
number.<average _other_keyed=<thing x=4 y=5/>/>
4.5