Below is the solution to the small-step evaluation problem involving functions from the end of the Thu Feb 02 class. A few notes: * Lots of people were missing parens. Each lambda expression is bounded by a pair of parens that is distinct from the pair of parens for the application of that lambda expression to arguments. * A lambda acts like a "black box", and the details of its body are never examined until the box is "opened" when it is applied. In particular, the n within (λ (num) (<= num n)) is hidden until this lambda expression is applied to a number. ------------------------------------------------------------------------------- env3 = n -> 10, small? -> (λ (num) (<= num n)) , sqr -> (λ (n) (* n n)) ( {small?} ( sqr n ) ) # env3 => ( (λ (num) (<= num n)) ( {sqr} n ) ) # env3 [varref for small?] => ( (λ (num) (<= num n)) ( (λ (n) (* n n)) {n} ) ) # env3 [varref for sqr] => ( (λ (num) (<= num n)) {( (λ (n) (* n n)) 10 )} ) # env3 [varref for n] => ( (λ (num) (<= num n)) {(* 10 10)} ) # env3 [apply] => {( (λ (num) (<= num n)) 100 )} # env3 [multiplication] => (<= 100 {n}) # env3 [apply] => {(<= 100 10)} # env3 [varref for n] => #f # env3 [less-than-or-equal-to]