learning-sicp

My embarrassing half assed SICP run.
git clone https://kaka.farm/~git/learning-sicp
Log | Files | Refs

exercise-30.scm (874B)


      1 (define-library (sicp tests chapter-1 exercise-30)
      2   (import (scheme base)
      3           (srfi :64)
      4           (sicp solutions chapter-1 exercise-30))
      5 
      6   (begin
      7     (test-begin "chapter-1-exercise-30")
      8     (test-equal
      9         (iterative-sum (lambda (x) (* x x))
     10                        5
     11                        (lambda (x) (+ 2 x))
     12                        20)
     13       (linear-recursive-sum (lambda (x) (* x x))
     14                             5
     15                             (lambda (x) (+ 2 x))
     16                             20))
     17     (test-equal
     18         (iterative-sum (lambda (x) (* x x))
     19                        5
     20                        (lambda (x) (* 2 x))
     21                        200)
     22       (linear-recursive-sum (lambda (x) (* x x))
     23                             5
     24                             (lambda (x) (* 2 x))
     25                             200))
     26     (test-end "chapter-1-exercise-30")))