[Haskell-cafe] List comparisons and permutation group code

Nicolas Frisby 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
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>


More information about the Haskell-Cafe mailing list