[plt-scheme] Scheme exercise(image.ss)

From: aditya shukla (adityashukla1983 at gmail.com)
Date: Thu Feb 26 17:06:42 EST 2009

This is the part that confused me ,that's why i just passed traffic-light as
a parameter  but never used it.

If you have experience programming in other languages, you might have
expected ALL-THREE-ON to change. That's because your previous language
probably uses the *imperative programming* style, which generally relies on
changing the values of variables. But in Scheme, we're programming in
the *functional
programming* style. This means that we're not changing the values of
variables; instead, we're just sending values as inputs to functions, which
return other values. You may wonder how it's even possible to write programs
without assigning new values to variables. Well, just stay tuned, and for
the moment just remember that the functions we write don't change the values
of their inputs.

Can someone please shed a light on the concept mentioned above ? and how do
i use it to make my function?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090226/b281f951/attachment.html>

Posted on the users mailing list.