From 9ca52fa8a329edc6975f0aa19856a4a8d782ad77 Mon Sep 17 00:00:00 2001
From: Jim
Date: Sun, 1 Feb 2015 10:36:40 -0500
Subject: [PATCH] week1 refinements
---
topics/week1.mdwn | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/topics/week1.mdwn b/topics/week1.mdwn
index 0bbea4ea..725c4d18 100644
--- a/topics/week1.mdwn
+++ b/topics/week1.mdwn
@@ -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:
--
2.11.0