Closed psycotica0 closed 9 years ago
In the tutorial, just above the section on proc notation, you've got the auto foo.
foo
The tutorial says the first output is (4, Just 4), but wouldn't it be (8, Just 4)?
(4, Just 4)
(8, Just 4)
First x goes in to sumX which returns 4, but then we add x + sumX, which is 4 + 4, right? That goes into prodX, which just returns 8.
x
sumX
4
x + sumX
4 + 4
prodX
8
lastEven appears to just pull from x, so it'd just be Just 4.
lastEven
Just 4
I can't actually install or run auto on my computer to check, but I wanted to check just in case my understanding is wrong.
auto
Thanks :) You're right, the tutorial is wrong on that line. The rest of the output is correct, it's just that 4. I've uploaded a corrected version :)
In the tutorial, just above the section on proc notation, you've got the auto
foo
.The tutorial says the first output is
(4, Just 4)
, but wouldn't it be(8, Just 4)
?First
x
goes in tosumX
which returns4
, but then we addx + sumX
, which is4 + 4
, right? That goes intoprodX
, which just returns8
.lastEven
appears to just pull fromx
, so it'd just beJust 4
.I can't actually install or run
auto
on my computer to check, but I wanted to check just in case my understanding is wrong.