Thanks guys, that's even more solutions than I need.

On Mon, Feb 9, 2009 at 4:38 PM, Wirt Wolff <wirtwolff@gmail.com> wrote:
Excerpts from Henri Ducrocq's message of Mon Feb 09 06:41:41 -0700 2009:
> For example
>   className =? "Google Mail"  --> doShift "1"
>   className =? "Google Calendar"  --> doShift "1"

can become:

import Data.List

   -- skipped
   fmap ("Google" `isPrefixOf`) className --> doShift "1"

Also from Data.List are isSuffixOf and isInfixOf if you need those.

> "bc" `isInfixOf` "abcdef"
True

> "bc" `isInfixOf` "bcdef" && "bc" `isInfixOf` "abc"
True
--
wmw
_______________________________________________
xmonad mailing list
xmonad@haskell.org
http://www.haskell.org/mailman/listinfo/xmonad