[Haskell-beginners] string instead of char
John Moore
john.moore54 at gmail.com
Sun Oct 4 12:05:33 EDT 2009
Hi,
I am now writing a function that replaces vowels with the letter x.
eg.put in a string "help" and out comes hxlp.
I tried this:
f x = case x of
{'a' -> 'x';'e' -> 'x';'i' -> 'x';'o' -> 'x';'u' -> 'x';_ -> x}
but this wont work on strings, only on the individual letters. Any direction
would be very welcome.
Yours
john
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20091004/a727e5c8/attachment.html
More information about the Beginners
mailing list