Proposal/Patch: Add findSublistIndex in Data.List

Carlos López Camey c.lopez at kmels.net
Sat Jun 16 13:18:01 CEST 2012


2012/6/16 Henning Thielemann <lemming at henning-thielemann.de>:
>
> On Sat, 16 Jun 2012, Carlos López Camey wrote:
>
>>> How about:
>>>
>>> findIndex (isPrefixOf "def") $ tails "abcdefgh"
>>
>>
>> I find that much better :-)
>
>
> Maybe we could add advanced uses of functions from Data.List to their
> Haddock documentation. But where to add this example? To 'isPrefixOf' or
> 'findIndex' or 'tails'? Or you might setup a HaskellWiki page listing such
> examples.
>

Good idea, I found one that suits this content and added your function
to it, here: http://www.haskell.org/haskellwiki/List_function_suggestions#Indexing_lists.



More information about the Libraries mailing list