X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=exercises%2Fassignment2_answers.mdwn;h=e131311c7d2913bab89028656380da66c8642162;hp=ad017f0039ac9fdeff4a4d71dbc11a725b0cf63d;hb=ccb65934b58c91f5bf06f6172e6877050d05d214;hpb=90b04cba6b40529aaa02ef0ae948fb2fa5a575e5 diff --git a/exercises/assignment2_answers.mdwn b/exercises/assignment2_answers.mdwn index ad017f00..e131311c 100644 --- a/exercises/assignment2_answers.mdwn +++ b/exercises/assignment2_answers.mdwn @@ -182,11 +182,7 @@ Folds and Lists 25. We mentioned in the Encoding notes that `fold_left (flipped_cons, []) xs` would give us the elements of `xs` but in the reverse order. So that's how we can express `reverse` in terms of `fold_left`. How would you express `reverse` in terms of `fold_right`? As with problem 22, don't use `letrec`! - This problem does have an elegant and concise solution, but it may be hard for you to figure it out. We think it will a useful exercise for you to try, anyway. We'll give a [[hint|assignment2 hint]]. Don't look at the hint until you've gotten really worked up about the problem. Before that, it probably will just be baffling. If your mind has really gotten its talons into the problem, though, the hint might be just what you need to break it open. - - There are also other, less cool answers. Perhaps you'll find one of them first. - - Even if you don't get any answer, we think the experience of working on the problem, and then understanding the answer when we reveal it, will be satisfying and worthwhile. It also fits our pedagogical purposes for some of the recurring themes of the class. + See the [[hint|assignment2 hint]]. Numbers