Hi, all, and authors of SEwPR in particular.

I believe Exercise 15.1 has the following problems:

1. The function passed to the Y combinator should have an parameter
   before `x' called `tri'.

2. `ifz' is not a construct in ISWIM as presented in the previous
   chapters. I could extend the language to support it, of course, but I
   think this does not contribute to the goal of the exercise. Instead,
   I think it should use `iszero'.

Summing up the previous two points, the code looks like:

    ((Y (λ tri (λ x
                 (((iszero x)
                   (λ y 0))
                  (λ y (+ x (tri (- x 1))))))))
     3)

-----

Let me take the opportunity to thank the authors for the book, PLT Redex
and Racket. The more I learn, the more I appreciate the effort you put
into them.

Best.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to