[Haskell-cafe] Splitting list with predicate

michael rice nowgate at yahoo.com
Sun Mar 14 16:19:19 EDT 2010


Thanks all,

Wouldn't one need to know the order of the arguments?

(a -> Bool) -> [a] -> ([a], [a])

Michael


--- On Sun, 3/14/10, Simon Hengel <simon.hengel at wiktory.org> wrote:

From: Simon Hengel <simon.hengel at wiktory.org>
Subject: Re: [Haskell-cafe] Splitting list with predicate
To: "michael rice" <nowgate at yahoo.com>
Cc: haskell-cafe at haskell.org
Date: Sunday, March 14, 2010, 3:45 PM

> Most excellent! Thanks.
I frequently use Hoogle[1] when I need a function, that I think must
exist, but do not know how it is named. Try:

(a -> Bool) -> [a] -> ([a], [a])

With the recipe from [2] you may even invoke hoogle from within ghci:

ghci> :hoogle (a -> Bool) -> [a] -> ([a], [a])

Hope that helps.

Cheers,
Simon

[1] http://haskell.org/hoogle/
[2] http://www.haskell.org/haskellwiki/Ghci#Hoogle



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100314/b4a8f95e/attachment.html


More information about the Haskell-Cafe mailing list