Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Created November 7, 2019 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chelseatroy/0def8e5beb78522b5efd1767af3ab471 to your computer and use it in GitHub Desktop.
Save chelseatroy/0def8e5beb78522b5efd1767af3ab471 to your computer and use it in GitHub Desktop.
Predicate of a Conditional
(define (seval-if sexp env)
(let ((test (if-test sexp))
(then-clause (if-then-clause sexp))
(else-clause (if-else-clause sexp)))
(if (actual-value test env)
(seval then-clause env)
(seval else-clause env))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment