[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: peasant revolt against DrScheme!
I really hate to join this "event" as it appears no one is going to change
their mind. Let me say however that DrScheme and Scheme in general has been
a wonderful addition to MY freshman classes where you find a mixture of
bright and less than bright often math challenged students. Skip the math
examples as that means they have to understand two things--the math and the
logic. Rather give them recursive non-math problems and they must think at
first and then begin to understand the concepts.
Example: Write a function (peek) in DrScheme to determine if a word appears
in a list of words.
Contract - peek: word list-of-words => Boolean
(define (peek wrd low)
(cond
[(empty? low)false]
[(equal? wrd (first low))true]
[else (peek wrd (rest low))]))
--
Richard Clemens
Associate Professor of Computer Science
West Virginia Wesleyan College
clemens@wvwc.edu