commit 42088ed56594d583ec08f0f2bf9397e2a6b83b2d
parent 8aa798ee1b197160c1069642aaa45946ab410601
Author: Yuval Langer <yuval.langer@gmail.com>
Date: Wed, 29 Mar 2023 15:10:13 +0300
Fix the library names and add a nil in utils.scm.
Diffstat:
12 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/sicp/solutions/exercise-1.1.scm b/sicp/solutions/exercise-1.1.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-1.1)
+(define-library (sicp solutions exercise-1.1)
(import (scheme base))
(import (srfi srfi-64))
(export sum-of-squares)
diff --git a/sicp/solutions/exercise-1.2.scm b/sicp/solutions/exercise-1.2.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-1.2)
+(define-library (sicp solutions exercise-1.2)
(import (scheme base))
(import (srfi srfi-64))
diff --git a/sicp/solutions/exercise-1.3.scm b/sicp/solutions/exercise-1.3.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-1.3)
+(define-library (sicp solutions exercise-1.3)
(import (scheme base))
(import (srfi srfi-64))
(import (guile-1.1))
diff --git a/sicp/solutions/exercise-1.4.scm b/sicp/solutions/exercise-1.4.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-1.4)
+(define-library (sicp solutions exercise-1.4)
(import (scheme base))
(import (srfi srfi-64))
diff --git a/sicp/solutions/exercise-2.33.scm b/sicp/solutions/exercise-2.33.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-2.33)
+(define-library (sicp solutions exercise-2.33)
(import (scheme base))
(import (utils))
(export map-2.33 append-2.33 length-2.33)
diff --git a/sicp/solutions/exercise-2.34.scm b/sicp/solutions/exercise-2.34.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-2.34)
+(define-library (sicp solutions exercise-2.34)
(import (scheme base))
(import (utils))
(export horner-eval)
diff --git a/sicp/solutions/exercise-2.35.scm b/sicp/solutions/exercise-2.35.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-2.35)
+(define-library (sicp solutions exercise-2.35)
(import (scheme base))
(import (sicp utils))
(export count-leaves count-leaves-2.2.2)
diff --git a/sicp/solutions/exercise-2.36.scm b/sicp/solutions/exercise-2.36.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-2.36)
+(define-library (sicp solutions exercise-2.36)
(import (scheme base))
(import (sicp utils))
(export accumulate-n)
diff --git a/sicp/solutions/exercise-2.41.scm b/sicp/solutions/exercise-2.41.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-2.41)
+(define-library (sicp solutions exercise-2.41)
(begin
(define (unique-triples n)
(flatmap (lambda (pair)
diff --git a/sicp/solutions/exercise-2.42.scm b/sicp/solutions/exercise-2.42.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-2.42)
+(define-library (sicp solutions exercise-2.42)
(import (scheme base))
(import (srfi :1))
(import (sicp utils))
diff --git a/sicp/solutions/exercise-2.61-2.62.scm b/sicp/solutions/exercise-2.61-2.62.scm
@@ -1,4 +1,4 @@
-(define-library (solutions exercise-2.61-2.62)
+(define-library (sicp solutions exercise-2.61-2.62)
(import (scheme base))
(begin
diff --git a/sicp/utils.scm b/sicp/utils.scm
@@ -1,13 +1,13 @@
(define-library (sicp utils)
(import (scheme base))
- (import (srfi srfi-1))
- (import (srfi srfi-64))
(export enumerate-interval
filter
flatmap
accumulate)
(begin
+ (define nil '())
+
(define (filter predicate sequence)
;; From 2.2.3 Sequences as Conventional Interfaces
(cond ((null? sequence) nil)