Maxime Henrion wrote: > This version takes care of avoiding a redundant character check
It still has several redundant checks: s'' is known to begin with space if it is non-empty, but that is checked again in the recursive call of wordsBy. In fact, break already checked whether s'' is empty, but wordsBy checks that again, too. Also - the pattern match in the case checks whether its list is empty, but that was already checked by dropWhile. If you want to guarantee that level of optimization, you probably have to inline everything by hand and not use any library functions at all. I wonder how much of that is already done by the compiler, though. -Yitz _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe