summaryrefslogtreecommitdiffstats
path: root/net/ricketyspace
diff options
context:
space:
mode:
Diffstat (limited to 'net/ricketyspace')
-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)))