darcs patch: New function isInfixOf that searches a list for a give...

Clifford Beshers clifford.beshers at linspire.com
Fri Sep 1 07:17:36 EDT 2006


Henning Thielemann wrote:
> On Fri, 1 Sep 2006, Ross Paterson wrote:
>
>   
>> On Thu, Aug 31, 2006 at 06:34:35PM -0700, Clifford Beshers wrote:
>>     
>>> These two jump to mind:
>>>
>>>    isSublistOf
>>>    isSubsequenceOf
>>>       
>> Sublist seems boringly accurate.  Also, the definition could be
>>     
>
> 'isInfixOf' is not the name I would search for, but if I find it (say by
> Hoogle) I would know that I found the right one. It is just analogous to
> 'isPrefixOf' and 'isSuffixOf' and thus it gets my vote.
>   

Given your explanation and given that Tomasz pointed out that 
subsequence was a really bad choice, I'm changing my vote to isInfixOf 
as well.

To help people who are searching for this function, could we change the 
documentation to read 'Predicates on sublists' instead of just 
'Predicates'?  The section entitled 'Extracting sublists' is pretty long 
and I never really noticed before that the two were part of the same 
larger category of 'Sublists'.

Cliff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org//pipermail/libraries/attachments/20060901/bd6c712f/attachment-0001.htm


More information about the Libraries mailing list