[Haskell-cafe] Haskell - string to list isusses, and more

Daniel Fischer daniel.is.fischer at web.de
Mon Jun 15 05:56:54 EDT 2009


Am Montag 15 Juni 2009 11:03:36 schrieb Luke Palmer:
> We can transform this to:
>
> startsWithUpper string = isUpper (head string)
>
> Under the precondition that the input is not [].  So this function has
> become less general.

What about

all isUpper . take 1

?
But of course the source reveals that words never puts an empty string into the list.


More information about the Haskell-Cafe mailing list