X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=exercises%2Fassignment2_hint.mdwn;h=89f442bf5de50f833e71d70e7b3a35b2ea9f58db;hp=13909260685deebc3fd6c22c9577750741f46090;hb=6b0f2cfa2e2c9b162984ed294590e24e42c7530e;hpb=d24e4e2516be5fc7a9e96c20b77e6134b4e51eab;ds=sidebyside diff --git a/exercises/assignment2_hint.mdwn b/exercises/assignment2_hint.mdwn index 13909260..89f442bf 100644 --- a/exercises/assignment2_hint.mdwn +++ b/exercises/assignment2_hint.mdwn @@ -8,7 +8,7 @@ The problem was: ### Here is a hint. ### -Suppose the list we want to reverse is `[10, 20, 30]`. Applying `fold_right` to this will begin by computing `f 30 z` for some `f` and `z` that we specify. If we made the result of that be something like `30 & blah`, or any larger structure that contained something of that form, it's not clear how we could, using just the resources of `fold_right`, reach down into that structure and replace the `blah` with some other element, as we'd evidently need to, since after the next step we should get `30 & (20 & blah)`. What we'd like instead is something like this: +Suppose the list we want to reverse is `[10, 20, 30]`. Applying `fold_right` to this will begin by computing `f (30, z)` for some `f` and `z` that we specify. If we made the result of that be something like `30 & blah`, or any larger structure that contained something of that form, it's not clear how we could, using just the resources of `fold_right`, reach down into that structure and replace the `blah` with some other element, as we'd evidently need to, since after the next step we should get `30 & (20 & blah)`. What we'd like instead is something like this: 30 & < >