RosettaCodeData/Task/Averages-Arithmetic-mean/Langur/averages-arithmetic-mean.langur
2026-04-30 12:34:36 -04:00

4 lines
134 B
Text

val umean = fn(x list) { fold(x, by=fn{+}) / len(x) }
writeln " custom: ", umean([7, 3, 12])
writeln "built-in: ", mean([7, 3, 12])