sicp

sicp sandbox.
git clone git://git.ricketyspace.net/sicp.git
Log | Files | Refs

commit 0bfe90e1fd4182d489a4933702a4ccaef3fd6eeb
parent b7fb111bb23060f6d76004efb26510e99f97d849
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat, 18 Aug 2018 16:30:32 +0000

* net/ricketyspace/sicp/two/eleven.scm: Add Guile REPL output.

Diffstat:
net/ricketyspace/sicp/two/eleven.scm | 32++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)

diff --git a/net/ricketyspace/sicp/two/eleven.scm b/net/ricketyspace/sicp/two/eleven.scm @@ -29,3 +29,35 @@ ((signs n p n p) (make-interval (min (* lbx uby) (* ubx lby)) (* ubx uby))) (else (error "Intervals not supported")))) + +;;; Guile REPL +;;; +;;; scheme@(guile-user)> ,use (net ricketyspace sicp two eleven) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 -3) (make-interval 5 7)) +;;; $8 = (-21 . -10) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval 2 3) (make-interval -5 -7)) +;;; $9 = (-21 . -10) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 3) (make-interval -5 7)) +;;; $10 = (-15 . 21) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 -3) (make-interval -5 7)) +;;; $11 = (-21 . 15) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 3) (make-interval -5 -7)) +;;; $12 = (-21 . 14) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 3) (make-interval 5 7)) +;;; $13 = (-14 . 21) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval 2 3) (make-interval -5 7)) +;;; $14 = (-15 . 21) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval 2 3) (make-interval 5 7)) +;;; $15 = (10 . 21) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 -3) (make-interval -5 -7)) +;;; $16 = (10 . 21) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 -3) (make-interval 5 7)) +;;; $17 = (-21 . -10) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval 2 3) (make-interval -5 -7)) +;;; $18 = (-21 . -10) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 -3) (make-interval -5 7)) +;;; $19 = (-21 . 15) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 3) (make-interval -5 -7)) +;;; $20 = (-21 . 14) +;;; scheme@(guile-user)> (mul-interval-alt (make-interval -2 3) (make-interval -5 7)) +;;; $21 = (-15 . 21)