Proposal/Patch: Add findSublistIndex in Data.List

Henning Thielemann schlepptop at henning-thielemann.de
Sat Jun 16 12:25:54 CEST 2012


Am 16.06.2012 12:05, schrieb Carlos López Camey:
> Hello,
>
> I think this function might be of help in Data.List. Why I believe it
> would be good to have it in base: `elem` is accompanied by `findIndex`
> but `isInfixOf` doesn't have an accompanist.

How about:

findIndex (isPrefixOf "def") $ tails "abcdefgh"

?




More information about the Libraries mailing list