This website requires JavaScript.
Explore
Help
Register
Sign In
retoor
/
wren
Watch
1
Star
0
Fork
0
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
66c9c1ad4bedc6c9e52d41d98bffbbb3a5ed1457
wren
/
test
/
list
/
reduce_single_item.wren
T
3 lines
96 B
Plaintext
Raw
Normal View
History
Unescape
Escape
feat: implement single-argument reduce with manual iteration and empty-sequence abort
2015-01-16 08:24:18 +00:00
IO.print([1].reduce {|a, b| 42 }) // expect: 1
IO.print([].reduce(1) {|a, b| 42 }) // expect: 1
Reference in New Issue
Copy Permalink