projects
/
lambda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fe9676f
)
(no commit message)
author
barker
<barker@web>
Mon, 13 Sep 2010 13:43:54 +0000
(09:43 -0400)
committer
Lambda Wiki
<lambda@SERVER.PHILOSOPHY.FAS.NYU.EDU>
Mon, 13 Sep 2010 13:43:54 +0000
(09:43 -0400)
assignment1.mdwn
patch
|
blob
|
history
diff --git
a/assignment1.mdwn
b/assignment1.mdwn
index
cb1dfd2
..
2b6b300
100644
(file)
--- a/
assignment1.mdwn
+++ b/
assignment1.mdwn
@@
-26,7
+26,7
@@
In Racket, these can be defined like this:
(define true (lambda (t) (lambda (f) t)))
(define false (lambda (t) (lambda (f) f)))
(define true (lambda (t) (lambda (f) t)))
(define false (lambda (t) (lambda (f) f)))
-
[8] Define a "neg" operator that negates "true" and "false".
+
*
[8] Define a "neg" operator that negates "true" and "false".
Expected behavior:
(((neg true) 10) 20)
Expected behavior:
(((neg true) 10) 20)
@@
-37,9
+37,9
@@
evaluates to 20, and
evaluates to 10.
evaluates to 10.
-
[9] Define an "and" operator.
+
*
[9] Define an "and" operator.
-
[10] Define an "xor" operator. (If you haven't seen this term before, here's a truth table:
+
*
[10] Define an "xor" operator. (If you haven't seen this term before, here's a truth table:
true xor true = false
true xor false = true
true xor true = false
true xor false = true
@@
-48,7
+48,7
@@
evaluates to 10.
)
)
-
11.
Inspired by our definition of boolean values, propose a data structure
+
* [11]
Inspired by our definition of boolean values, propose a data structure
capable of representing one of the two values "black" or "white". If we have
one of those values, call it a black-or-white-value, we should be able to
write:
capable of representing one of the two values "black" or "white". If we have
one of those values, call it a black-or-white-value, we should be able to
write: