[Haskell-cafe] Text: find

Antoine Latter aslatter at gmail.com
Sun Oct 17 16:51:47 EDT 2010

On Sun, Oct 17, 2010 at 3:25 PM, Bryan O'Sullivan <bos at serpentine.com> wrote:
> On Mon, Oct 11, 2010 at 1:12 PM, Malcolm Wallace <malcolm.wallace at me.com>
> wrote:
>>  find        find      find           (Text -> Bool) -> Text -> Maybe Text
>> Proposal: rename Text.findBy to Text.find.
> I agree with the change of type, not so much with the naming. That's roughly
> my stance in the other cases, too.

What would the definition of a function of the form:

> find :: (Text -> Bool) -> Text -> Maybe Text

look like?

What sort of requirements would be placed on the input predicate?
Maybe I have a failure of imagination, but that sounds like a tricky
thing to get correct for all predicates.


More information about the Haskell-Cafe mailing list