[Haskell-beginners] Pattern matching with one, two or more arguments

Deniz Dogan deniz.a.m.dogan at gmail.com
Sun Nov 29 12:45:01 EST 2009

2009/11/29 legajid <legajid at free.fr>:
> Another trick : how can i calculate consonnes with a method that makes the
> difference between  the two lists [a..z] and  voyelles, rather  than writing
> each consonant.
> As we can append two lists (++), can we compute the difference between
> lists, i.e. delete from the first list the elements that are present in the
> second one ?

Use Data.List.\\

['a'..'z'] \\ "aoeui" ==> "bcdfghjklmnpqrstvwxyz"

Deniz Dogan

More information about the Beginners mailing list