Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for reduce with one item #62

Closed
quietfanatic opened this issue Jun 12, 2015 · 0 comments
Closed

Add test for reduce with one item #62

quietfanatic opened this issue Jun 12, 2015 · 0 comments

Comments

@quietfanatic
Copy link

quietfanatic commented Jun 12, 2015

[15:17] <quietfanatic> p6: say (reduce *+*, 1, 2).WHAT
[15:17] <+camelia> rakudo-moar af886d: OUTPUT«(Int)␤»
[15:17] <quietfanatic> p6: say (reduce *+*, 1).WHAT
[15:17] <+camelia> rakudo-moar af886d: OUTPUT«(List)␤»
[15:17] <quietfanatic> Hah.  If that isn't a reportable bug, I don't know what is.

I expect reduce with one item to return that item, but it wraps it in a List instead.

This should test for that.
is-deeply(reduce(+, 72), 72, "reduce with one item returns that item")

athos-ribeiro added a commit to athos-ribeiro/roast that referenced this issue Oct 28, 2016
zoffixznet pushed a commit that referenced this issue Oct 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants