summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-06-30 15:27:00 +0000
committerrsiddharth <s@ricketyspace.net>2018-06-30 15:27:00 +0000
commit28d92f8a32885afc0cc11967bbbbe813288fd505 (patch)
tree634b51f9e0291bb9b6740185749ffaece92c2ebc /net
parent0cb7345537c7fb0537fa2f6108414ca7bf0fed73 (diff)
net: Add (net ricketyspace sicp two four).
* net/ricketyspace/sicp/two/four.scm: New file.
Diffstat (limited to 'net')
-rw-r--r--net/ricketyspace/sicp/two/four.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/ricketyspace/sicp/two/four.scm b/net/ricketyspace/sicp/two/four.scm
new file mode 100644
index 0000000..d00211a
--- /dev/null
+++ b/net/ricketyspace/sicp/two/four.scm
@@ -0,0 +1,15 @@
+;;;; Under Creative Commons Attribution-ShareAlike 4.0
+;;;; International. See
+;;;; <https://creativecommons.org/licenses/by-sa/4.0/>.
+
+(define-module (net ricketyspace sicp two four)
+ #:export (sicp-cons sicp-car sicp-cdr))
+
+(define (sicp-cons x y)
+ (lambda (m) (m x y)))
+
+(define (sicp-car z)
+ (z (lambda (p q) p)))
+
+(define (sicp-cdr z)
+ (z (lambda (p q) q)))