[plt-scheme] suggestions and commendations for exercise 2.21

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Mar 31 11:22:34 EST 2004

I have created an alternative teachpack "mathematical.ss" that provide 
a gui and a repl for applying functions.

Examples:

 > (function-as-repl f "identity" "number" 'x)
Enter number and press <enter> [to exit, type x]: 100
identity maps 100 to 100
Enter number and press <enter> [to exit, type x]: 200
identity maps 200 to 200
Enter number and press <enter> [to exit, type x]: 0
identity maps 0 to 0
Enter number and press <enter> [to exit, type x]: x

 > (function-as-repl f2c "Fahrenheit-to-Celsius" "Celsius temperature" 
'a)
Enter Celsius temperature and press <enter> [to exit, type a]: 212
Fahrenheit-to-Celsius maps 212 to 413 3/5
Enter Celsius temperature and press <enter> [to exit, type a]: 100
Fahrenheit-to-Celsius maps 100 to 212
Enter Celsius temperature and press <enter> [to exit, type a]: -40
Fahrenheit-to-Celsius maps -40 to -40
Enter Celsius temperature and press <enter> [to exit, type a]: 0
Fahrenheit-to-Celsius maps 0 to 32
Enter Celsius temperature and press <enter> [to exit, type a]: a

 >

Invisible examples:

 > (function-as-gui/simple f -100 +100)
 > (function-as-gui f2c -100 +100 "Fahrenheit to Celsius converion" 
"F->C" "Fahrenheit" "Celsius")

For your entertainment, I attach the new teachpack. Save it and set 
your teachpack to this file. If you find it useful, let us know and we 
distribute it with DrScheme. -- Matthias


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mathematical.ss
Type: application/text
Size: 10660 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20040331/4ee3ec2c/attachment.bin>

Posted on the users mailing list.