
21 Oct
2006
21 Oct
'06
4:30 a.m.
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 Tomasz