mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-16 20:28:04 +01:00
5 lines
137 B
Plaintext
5 lines
137 B
Plaintext
var range = 1..10
|
|
|
|
IO.print(range.reduce {|a, b| a + b }) // expect: 55
|
|
IO.print(range.reduce(100) {|a, b| a < b ? a : b }) // expect: 1
|