On Apr 3, 2012, at 9:34 AM, Roelof Wobben wrote:

> I have to make this exercise : 
> 
> Design the function different. It consumes two (representations of) 
> three-letter words and creates a word from the differences. For each position 
> in the words, it uses the letter from the second word, if the two are the 
> same; otherwise it uses the marker "*". Note: The problem statement mentions 
> two different tasks: one concerning words and one concerning letters. This 
> suggests that you design two functions.
> 
> Im my opion I only need 1 function.
> 
> I use a cond to check if the letters are the same and if print the letter 
> otherwise print x .

I can imagine doing this as a single function, but I agree that it would be 
cleaner and more modifiable if it were done as two functions, "one concerning 
words and one concerning letters."

What is the contract of your 1 function?



Stephen Bloch
sbl...@adelphi.edu

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to