summaryrefslogtreecommitdiffstats
path: root/net/ricketyspace
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-11-09 20:14:55 -0500
committerrsiddharth <s@ricketyspace.net>2018-11-09 20:14:55 -0500
commit73ef53b87b5756e9fcb45f5c2851431a7c8d1422 (patch)
tree5e548f5bf0686d1787eb0a5ae51c1c59830869c9 /net/ricketyspace
parent0f3b6bcb7dc4425c08e91348978b521baf401b07 (diff)
net: Add (net ricketyspace sicp two seventeen).
Diffstat (limited to 'net/ricketyspace')
-rw-r--r--net/ricketyspace/sicp/two/seventeen.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ricketyspace/sicp/two/seventeen.scm b/net/ricketyspace/sicp/two/seventeen.scm
new file mode 100644
index 0000000..0c6180c
--- /dev/null
+++ b/net/ricketyspace/sicp/two/seventeen.scm
@@ -0,0 +1,8 @@
+;;;; License: CC0-1.0
+
+(define-module (net ricketyspace sicp two seventeen)
+ #:export (sicp-last-pair))
+
+(define (sicp-last-pair items)
+ (cond ((= (length items) 1) items)
+ (else (sicp-last-pair (cdr items)))))