X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=exercises%2Fassignment3.mdwn;h=590bae75b73ade1f7875f409e68ec3adb5ba4d25;hp=57b6d4d82e668da5ebe1f4889cbdae910adbfc23;hb=d13ff61a8d850e297e12ebb5d77464162849cfc2;hpb=57be0c4918eef2e0441645bb32464bedc94c6477 diff --git a/exercises/assignment3.mdwn b/exercises/assignment3.mdwn index 57b6d4d8..590bae75 100644 --- a/exercises/assignment3.mdwn +++ b/exercises/assignment3.mdwn @@ -18,6 +18,7 @@ 8. Suppose you have two lists of integers, `left` and `right`. You want to determine whether those lists are equal, that is, whether they have all the same members in the same order. How would you implement such a list comparison? You can write it in Scheme or Kapulet using `letrec`, or if you want more of a challenge, in the Lambda Calculus using your preferred encoding for lists. If you write it in Scheme, don't rely on applying the built-in comparison operator `equal?` to the lists themselves. (Nor on the operator `eqv?`, which might not do what you expect.) You can however rely on the comparison operator `=` which accepts only number arguments. If you write it in the Lambda Calculus, you can use your implementation of `leq`, requested below, to write an equality operator for Church-encoded numbers. [[Here is a hint|assignment3 hint3]], if you need it. + (The function you're trying to define here is like `eqlist?` in Chapter 5 of *The Little Schemer*, though you are only concerned with lists of numbers, whereas the function from *The Little Schemer* also works on lists containing symbolic atoms --- and in the final version from that Chapter, also on lists that contain other, embedded lists.) ## Numbers