- Index
- »
- math
- »
- func:median
def
func:median
median(val, acc)
Fold a sample of numbers into their median value which is the middle value of the sorted samples. If there are an even number of sample, then the median is the mean of the middle two. Null values are ignored. Return null if no values.
Example:
[2, 4, 5, 3, 1].fold(median)