[Haskell-cafe] Haskell - string to list isusses, and more
daimaox at gmail.com
Sun Jun 14 13:14:11 EDT 2009
Gjuro Chensen wrote:
I dont know everyone will see this, but I would like thank everyone who
found time to help, and not spam too much doing it:D.
Well, I did it! Its not great (especially comparing to those one line
solutions, wow!), but it works.
module Main where
startsWithUpper :: String -> Bool
startsWithUpper = False
startsWithUpper string =
if myIsUpper(head(string)) then True
myIsUpper :: Char -> Bool
myIsUpper x =
if x>='A' && x <= 'Z' then True
checkAll string = check (words string)
check :: [String] -> Bool
check x =
if all startsWithUpper x then True
Since importing modules isnt allowed, I made my own isUpper. And thats it,
for few days of Haskell, Im happy.
Once again, many many thanks to everyone!
View this message in context: http://www.nabble.com/Haskell---string-to-list-isusses%2C-and-more-tp24022673p24023759.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
More information about the Haskell-Cafe