> I wrote this code putting brevity over readability, which is something I usually never do<p>Shouldn't the point of such a post be to show interesting code? I'm having trouble reading through the densely packed source.<p>In addition to tromp's minor nitpick, I have several major ones.<p>- the code is full of redundant parentheses. HLint can detect those (and many other style errors) automatically. LPaste has HLint installed so you have a linting pastebin available online. <a href="http://lpaste.net/116871" rel="nofollow">http://lpaste.net/116871</a><p>- A lot of the functions are written in a non-idiomatic way. "m >>= return . f" is "fmap", "(.)" can combine functions much more readable than Lisp stacks of parentheses.<p>- ByteString.Char8 is usually a wrong choice, more on that here: <a href="https://github.com/quchen/articles/blob/master/fbut.md#bytestringchar8-is-bad" rel="nofollow">https://github.com/quchen/articles/blob/master/fbut.md#bytes...</a><p>- If you count to "length x" then often there's a more elegant solution that avoids calculating the length altogether. For example "splits xs = zip (inits xs) (tails xs)".<p>- Brevity is never better than readability.<p>- No top-level definitions should lack a type signature. GHC even has warnings for that (I think they start firing with -W).<p>- A function should do one thing and then be composed with other functions. "lowerWords" converts to words and then maps them all to lower case, for example. These are two completely different operations in one long line.<p>- In order of increasing generality: foldr union empty = unions = mconcat = fold<p>- Use pattern matching, avoid "(!!)". transposes w = [ a ++ [b0,b1] ++ bs | (a, b0:b1:bs) <- splits w] - also see <a href="https://github.com/quchen/articles/blob/master/fbut.md#head-tail-isjust-isnothing-fromjust-" rel="nofollow">https://github.com/quchen/articles/blob/master/fbut.md#head-...</a><p>- For large amounts of words that you split and concatenate again, String is probably not the right type. Text is good for dealing with such things.<p>- replaces w = [as ++ [c] ++ bs | (as, _:bs) <- splits w , c <- alphabet]<p>... and so on.