2009/6/14 Jochem Berndsen <joc...@functor.nl>:
> Toby Miller wrote:
>> caps1 s = all (\x -> isUpper (head x)) (words s)
> This seems fine, but you need to check that words never returns a list
> containing the empty string (otherwise `head' will fail).

Is there any such case? I was thinking about that as well, but
couldn't think of any case where head would be called on an empty
list.

-- 
Deniz Dogan
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to