On 2004 December 29 Wednesday 19:13, Dominic Fox wrote:
> any obvious respects in which this program
> could be simplified, clarified or made more idiomatic.

isYes = `elem` ["y", "yes", "Y", "YES"]

withArticle fullString@(x:xs) =
 (if x `elem` "aeiou" then "an " else "a ") ++ fullString
withArticle [] = "" -- in case of empty input
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to