(home)

📝
Hypermedia Source Code: SICP 1.1.4 Example


About

📙 Structure and Interpretation of Computer Programs Section 1.1.4: Compound Procedues, translated to hypermedia.

Transpile

Install the 💾 Igneous Linearizer. Then run:

$ igneous-linearizer main.md > main.scm

Graph

G main main square square main->square sum_of_squares sum-of-squares main->sum_of_squares f f main->f sum_of_squares->square f->sum_of_squares

Code

square

(define (square x) (* x x))

sum-of-squares

(define (sum-of-squares x y)
	(+ (square x) (square y)))

f

(define (f a)
	(sum-of-squares (+ a 1) (* a 2)))

Backlinks