Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java laugh simple

Name: Anonymous 2013-02-16 10:42

My head is spinning at the fact I cant do such a simple problem, a month off really didnt do me any good.

How do I check if a string which contains a phrase or a word has all its vowels but in alphabetical order.
eg. aerious

Name: Anonymous 2013-02-16 11:15


ascending :: Ord a => [a] -> Bool
ascending xs = and $ zipWith (<) xs (tail xs)

isVowel :: Char -> Bool
isVowel = (`elem` "aeiou")

check :: String -> Bool
check = ascending . filter isVowel

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List