
4 Oct
2009
4 Oct
'09
12:10 p.m.
"John" == John Moore
writes:
John> Hi, I am now writing a function that replaces vowels with John> the letter x. eg.put in a string "help" and out comes hxlp. John> I tried this: John> f x = case x of John> {'a' -> 'x';'e' -> 'x';'i' -> 'x';'o' -> 'x';'u' -> John> 'x';_ -> x} John> but this wont work on strings, only on the individual John> letters. Any direction would be very welcome. You need to call map f "whatever" where f is your function for replacing a character (as above). -- Colin Adams Preston Lancashire