week1 refinements
[lambda.git] / topics / week1.mdwn
index 0bbea4e..725c4d1 100644 (file)
@@ -383,8 +383,8 @@ is a pattern, meaning the same as `x1 & x2 & []`. Note that while `x & xs` match
 For the time being, these are the only patterns we'll allow. But since the definition of patterns is recursive, this permits very complex patterns. What would this evaluate to:
 
     let
-      ([x, y], [z:zs, w]) match ([[], [1]], [[10, 20, 30], [0]])
-    in (z, y)
+      ([xs, ys], [z:zs, ws]) match ([[], [1]], [[10, 20, 30], [0]])
+    in z & ys
 
 Also, we will permit complex patterns in λ-expressions, too. So you can write: