Scheme Programming Examples
- how-many.scm, an example of recursive
programming on lists
- locals.scm, an example of local
definitions
- functional_abstraction.scm, a
bunch of examples of treating functions as "first-class objects"; that
is, you can do pretty much the same things with functions (pass them as
parameters, return them as results, store them in variables, define them
locally, construct them on the fly without names) that you can do with
numbers or strings
- For consistency with the C, C++, and Java examples, hello.scm defines a function "voting-message" that
takes in a string representing an age and returns an appropriate message
about whether the person can vote.
- For consistency with the Java examples, hello-gui.scm does the same thing in a
GUI.
Last modified:
Stephen Bloch / sbloch@adelphi.edu