On Dec 28, 2007 11:40 PM, Mitar <[EMAIL PROTECTED]> wrote:
> Would not it be interesting and useful (but not really efficient) to
> have patterns something like:
>
> foo :: Eq a => a -> ...
> foo (_{4}'b') = ...
>
> which would match a list with four elements ending with an element 'b'. Or:
>
> foo (_+';'_+';'_) = ...
>
> which would match a list with embedded two ';' elements. (Last _
> matched the remaining of the list.)
>
I suggest you take at look at HaRP, Haskell Regular Patterns:
http://www.cs.chalmers.se/~d00nibro/harp/It hasn't been updated for a while but it should still be useable. Cheers, Josef _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
