mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 14:18:42 +01:00
Use @munificent's single-argument reduce
This commit is contained in:
@ -1 +1,2 @@
|
||||
[1].reduce {|a, b| a } // expect runtime error: Range start out of bounds.
|
||||
IO.print([1].reduce {|a, b| 42 }) // expect: 1
|
||||
IO.print([].reduce(1) {|a, b| 42 }) // expect: 1
|
||||
|
||||
Reference in New Issue
Block a user