projects
/
lambda.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(no commit message)
[lambda.git]
/
assignment1.mdwn
diff --git
a/assignment1.mdwn
b/assignment1.mdwn
index
bbb393b
..
560d288
100644
(file)
--- a/
assignment1.mdwn
+++ b/
assignment1.mdwn
@@
-41,6
+41,7
@@
evaluates to 10.
* Define an "and" operator.
* Define an "xor" operator.
* Define an "and" operator.
* Define an "xor" operator.
+
(If you haven't seen this term before, here's a truth table:
true xor true = false
(If you haven't seen this term before, here's a truth table:
true xor true = false
@@
-83,8
+84,8
@@
To extract the first element of a pair p, you write:
Here are some defintions in Racket:
(define make-pair (lambda (fst) (lambda (snd) (lambda (f) ((f fst) snd)))))
Here are some defintions in Racket:
(define make-pair (lambda (fst) (lambda (snd) (lambda (f) ((f fst) snd)))))
- (define get-first (lamda (fst) (lambda (snd) fst)))
- (define get-second (lamda (fst) (lambda (snd) snd)))
+ (define get-first (lam
b
da (fst) (lambda (snd) fst)))
+ (define get-second (lam
b
da (fst) (lambda (snd) snd)))
Now we can write:
Now we can write: