[plt-scheme] 2htdp/image questions

From: Marco Morazan (morazanm at gmail.com)
Date: Sun Apr 18 10:20:13 EDT 2010

> ; map-image : (x y color -> color) image -> image
> which allows you to easily write, for example, a color gradient transform.

I am curious why you would want to write the specification that way. I
would have stated it as:

; map-image: (pixel -> color) image -> image

This, of course, assumes that structures have been introduced and that
there is a structure called pixel. What is the reasoning for saying (x
y color -> color)? It seems more confusing to me, but I may be wrong.

> ; build-image : width height (x y -> color) -> image
> But if I want my students to be able to use this before they've seen local
> or lambda, I would want them to be able to specify "side parameters" (which
> are curried in before calling the above version):

Do your students see HOFs before lambda and local?




Posted on the users mailing list.