X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek2_encodings.mdwn;h=091fb4c5e19d8069a851375db8dc7d28fdfa794a;hp=85d4d77b3b8d77f7e68124f6913afa227cb2923d;hb=629e27a98dad2c0c1bb4dbcc246c2d03693ef7c6;hpb=3212b68efef975f8ae4b7057e827e60654c6f29f diff --git a/topics/week2_encodings.mdwn b/topics/week2_encodings.mdwn index 85d4d77b..091fb4c5 100644 --- a/topics/week2_encodings.mdwn +++ b/topics/week2_encodings.mdwn @@ -231,6 +231,7 @@ That will evaluate to whatever this does: f (f (f (z, 10), 20), 30) + With a commutative operator like `(+)`, it makes no difference whether you say `fold_right ((+), z) xs` or `fold_left ((+), z) xs`. But with other operators it will make a difference. We can't say `fold_left ((&), []) [10, 20, 30]`, since that would start by trying to evaluate `[] & 10`, which would crash. But we could do this: let