Skip to content

Commit

Permalink
Merge pull request #128 from thinker1990/chapter05
Browse files Browse the repository at this point in the history
add exercise 5.13
  • Loading branch information
thinker1990 authored Jul 29, 2019
2 parents 33eb3d9 + c777e34 commit 0b36f3a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions chapter05/5_13.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
;; Solution from: http://community.schemewiki.org/?sicp-ex-5.13

(define (lookup-register name)
(let ((val (assoc name register-table)))
(if val
(cadr val)
(begin (allocate-register name)
(lookup-register name)))))

0 comments on commit 0b36f3a

Please sign in to comment.