[Haskell-cafe] List comparisons and permutation group code
nicolas.frisby at gmail.com
Fri Oct 20 13:13:42 EDT 2006
Using the base libraries... how sneaky. :)
On 10/20/06, David House <dmhouse at gmail.com> wrote:
> On 20/10/06, Henk-Jan van Tuyl <hjgtuyl at chello.nl> wrote:
> > How about this:
> > import List
> > isIdentity (PL xs) = xs `isPrefixOf` [1..]
> > ?
> Nice! Short, lazy and says what it does (onomatopoeic code? :)).
> -David House, dmhouse at gmail.com
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe