
I started my search for teaching materials at How to Design Programs, Second Edition. This free online book teaches programming from the ground up, and assumes no prior experience. In some ways this is good, even for third year CS majors who are learning functional programming for the first time. It can't be our main text, but there are many good sections to reference.
Even better, the book features DrRacket's image and universe teachpacks. That means that there are some fun, visual examples among the usual traditional applications of programming. That's where I started to learn about these tools, since I had never seen them before myself.
Another resource I found helpful was How to Design Worlds, a supplementary online book that covers how to use an older version of universe and the related worlds. From there, I found the chicken-crossing-the-road example you see in the screenshot above. The code for the chicken project is available online - the only problem is that it's based on the old teachpacks, and doesn't run out of the box in the newest DrRacket IDE.
Not to worry - I updated the code (which was not much work in the end), and added a few useful comments. If you'd like to make use of it, download the zip. If you are just learning Scheme, try using this as a fun example to get you started. Good luck!

Post a Comment