z
|
f----1----f
| : |
f----2----f
| : |
f----3----f
| : |
f----4----f
| : |
f----5----f
: |
[] z
Hobby-hacking Eric
2009-01-08
fold diagram revisited?
Subscribe to:
Post Comments (Atom)
Hobby-hacking Eric
z
|
f----1----f
| : |
f----2----f
| : |
f----3----f
| : |
f----4----f
| : |
f----5----f
: |
[] z
z
|
f----1----f
| : |
f----2----f
| : |
f----3----f
| : |
f----4----f
| : |
f----5----f
: |
[] z
1 comment:
One thing that I just now understood tripped me up was looking at this definition (foldl f z [] = z), looking back at the diagram and then doing a double-take (wait, that can't be right? how did z get down there?).
Of course, that's because I forgot that z here is just the parameter to that fold case, and not necessarily the z you pass in when you call fold on a list.
Post a Comment