chickadee » sicp » ambeval

ambeval exp env succeed failprocedure

Evaluates the expression using backtracking search.

exp
The expression to evaluate
env
The environment to evaluate it in
succeed
The success-continuation
fail
The failure-continuation
(define (ambeval exp env succeed fail) ((analyze exp) env succeed fail))