Henning Thielemann | 16 Jun 2012 13:00
Picon

Re: Proposal/Patch: Add findSublistIndex in Data.List


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.

_______________________________________________
Libraries mailing list
Libraries <at> haskell.org
http://www.haskell.org/mailman/listinfo/libraries
Carlos López Camey | 16 Jun 2012 13:18
Gravatar

Re: Proposal/Patch: Add findSublistIndex in Data.List

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.

Gmane