summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ricketyspace/sicp/two/eight.scm11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/ricketyspace/sicp/two/eight.scm b/net/ricketyspace/sicp/two/eight.scm
new file mode 100644
index 0000000..7a7611e
--- /dev/null
+++ b/net/ricketyspace/sicp/two/eight.scm
@@ -0,0 +1,11 @@
+;;;; Under Creative Commons Attribution-ShareAlike 4.0
+;;;; International. See
+;;;; <https://creativecommons.org/licenses/by-sa/4.0/>.
+
+(define-module (net ricketyspace sicp two eight)
+ #:use-module (net ricketyspace sicp two seven)
+ #:export (sub-interval))
+
+(define (sub-interval x y)
+ (make-interval (- (lower-bound x) (lower-bound y))
+ (- (upper-bound x) (upper-bound y))))