Add reduce test for ranges

This commit is contained in:
Luchs
2015-01-16 09:33:23 +01:00
parent d764581a3d
commit 4bc06a3acc

4
test/range/reduce.wren Normal file
View File

@ -0,0 +1,4 @@
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