assignment4: reverse
[lambda.git] / assignment4.mdwn
index 34fb044..7423806 100644 (file)
@@ -1,13 +1,12 @@
-Assignment 4
-------------
-
 #Reversing a list#
 
-How would you define an operation to reverse a list? (Don't peek at the
+1.     How would you define an operation to reverse a list? (Don't peek at the
 [[lambda_library]]! Try to figure it out on your own.) Choose whichever
 implementation of list you like. Even then, there are various strategies you
 can use.
 
+(See [[hints/Assignment 4 hint 1]] if you need some hints.)
+
 
 #Comparing lists for equality#
 
@@ -28,13 +27,17 @@ let list_equal =
                 ; (might_for_all_i_know_still_be_equal?, tail_of_reversed_right)
                 ; when left is empty, the lists are equal if right is empty
                 (make_pair
-                    (not (isempty right))
+                    true ; for all we know so far, they might still be equal
                     (reverse right)
                 )
                 ; when fold is finished, check sofar-pair
                 (\might_be_equal right_tail. and might_be_equal (isempty right_tail))
 -->
 
+#Mutually-recursive functions#
+
+
+
 #Enumerating the fringe of a leaf-labeled tree#
 
 [[Implementing trees]]