learning-sicp

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

exercise-1.scm (356B)


      1 (define-library (sicp solutions chapter-1 exercise-1)
      2   (import (scheme base))
      3   (export
      4    a
      5    b
      6    sum-of-squares
      7    )
      8 
      9   (begin
     10     (define a 3)
     11 
     12     ;; nothing
     13 
     14     (define b (+ a 1))
     15 
     16     ;; nothing
     17 
     18 
     19     (define (square a)
     20       (* a a))
     21 
     22     ;; nothing
     23 
     24     (define (sum-of-squares a b)
     25       (+ (square a)
     26          (square b)))
     27 
     28     ;; nothing
     29 ))