15 lines
No EOL
198 B
Text
15 lines
No EOL
198 B
Text
fun sum(x: list<f64>) -> f64 {
|
|
let result = 0;
|
|
for v in x {
|
|
result = result + v;
|
|
}
|
|
result
|
|
}
|
|
|
|
fun test() -> f64 {
|
|
let val = [1, 2, 3];
|
|
sum(val)
|
|
}
|
|
|
|
// @no-errors
|
|
// @type: 88 list<f64> |