fREWdiculous!
6 Mar
Did you do a reduce and get confused about how it got the final answer? Do you just want to see the computer write out it’s work? Check it:
1 2 3 4 5 6 7 8 9 10 11 12 | (1,2,3).reduce({ $^a / $^b }) RESULT«0.166666666666667» (1,2,3).reduce({"($^a / $^b)"}) RESULT«"((1 / 2) / 3)"» (1,2,3).reduce({ $^b / $^a }) RESULT«1.5» (1,2,3).reduce({"($^b / $^a)"}) RESULT«"((3 / 2) / 1)"» |
How cool is that?
2 Responses for "Reduce: what exactly did it do?"
Didn’t you mean “$^b / $^a” instead in the last two examples?
@prakash: yes! I don’t know how I made that mistake…
Leave a reply