Skip to content

Commit

Permalink
Add 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Leimkuhler committed Mar 16, 2018
1 parent 7645e2f commit 5b8cd00
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions 4/ex-1-x.scm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
;; 4.1
;; Original implementation of `list-of-values` that is order dependent
(define (list-of-values exps env)
(if (no-operands? exps)
Expand All @@ -22,3 +23,12 @@
(cons (eval (first-operand exps) env)
rest-vals))
(list-of-values-rl (rest-operands exps) env))))

;; 4.2
;; a). Procedure application clause appearing before assignment clauses causes
;; issues because procedure application checks for `pair?` and the
;; assigment clause would satisfy that predicate.

;; b).
(define (call? exp)
(tagged-list? exp 'call))

0 comments on commit 5b8cd00

Please sign in to comment.