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

Tomasz Zielonka tomasz.zielonka at gmail.com
Fri Sep 1 01:50:04 EDT 2006


On Thu, Aug 31, 2006 at 06:34:35PM -0700, Clifford Beshers wrote:
> John Goerzen wrote:
> >
> >We had a brief discussion about the name on #haskell today.  I didn't
> >care for isSubstringOf in this particular case, since this function
> >isn't limited to strings.  On the other hand, isInfixOf isn't a
> >particularly intuitive name either, so suggestions would be good.
> 
> These two jump to mind:
> 
>    isSublistOf
>    isSubsequenceOf

http://en.wikipedia.org/wiki/Subsequence

"Substring vs. subsequence

In computer science, string is often used as a synonym for sequence, but
it is important to note that substring and subsequence are not synonyms.
Substrings are consecutive parts of a string, while subsequences need
not be. This means that a substring of a string is always a subsequence
of the string, but the opposite is not true."

Best regards
Tomasz


More information about the Libraries mailing list