From: jim Date: Sun, 8 Feb 2015 02:37:00 +0000 (-0500) Subject: uncurry f for Kapulet X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=6b0f2cfa2e2c9b162984ed294590e24e42c7530e uncurry f for Kapulet --- 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 & < >