From 065d0c3acbe4cbbc05a718ce9e9a336e258e9e56 Mon Sep 17 00:00:00 2001
From: jim
Date: Sun, 22 Feb 2015 13:01:21 -0500
Subject: [PATCH] add head to list functions
---
exercises/assignment4.mdwn | 1 +
1 file changed, 1 insertion(+)
diff --git a/exercises/assignment4.mdwn b/exercises/assignment4.mdwn
index 8bbeffe4..59baf136 100644
--- a/exercises/assignment4.mdwn
+++ b/exercises/assignment4.mdwn
@@ -62,6 +62,7 @@ For instance, `fact 0 ~~> 1`, `fact 1 ~~> 1`, `fact 2 ~~> 2`, `fact 3 ~~>
let empty = \f n. n in
let cons = \x xs. \f n. f x xs in
let empty? = \xs. xs (\y ys. false) true in
+ let head = \xs. xs (\y ys. y) err in
let tail = \xs. xs (\y ys. ys) empty in
let append = Y (\append. \xs zs. xs (\y ys. (cons y (append ys zs))) zs) in
let take_while = Y (\take_while. \p xs. xs (\y ys. (p y) (cons y (take_while p ys)) empty) empty) in
--
2.11.0