[Haskell-cafe] List comparisons and permutation group code

Tomasz Zielonka tomasz.zielonka at gmail.com
Sat Oct 21 04:30:41 EDT 2006

On Fri, Oct 20, 2006 at 06:08:26PM +0200, Henk-Jan van Tuyl wrote:
> How about this:
>   import List
>   isIdentity (PL xs) =  xs `isPrefixOf` [1..]
> ?

Great! This is so natural.

When will I finally learn to continue thinking after finding the first
solution, especially when I feel it's not ideal?!

Do you also have this experience with Haskell?: when you feel that
some code is not ideal, almost always it can be improved.

It's much harder in some other languages, for example, in C++ there
is always something wrong with the code ;-)

Best regards

More information about the Haskell-Cafe mailing list