diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ricketyspace/sicp/two/seventeen.scm | 8 |
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))))) |