Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
1.0-beta-5
-
None
-
None
Description
I had to use () to get the expected result, as shown below:
1> print( [1, 2, 3].inject(0)
{ c, s | c + s })2> /
6
1> print [1, 2, 3].inject(0) { c, s | c + s }
2> /
null
1> x = [1, 2, 3].inject(0)
{ c, s | c + s }; println x
2> /
6