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

Ross Paterson ross at soi.city.ac.uk
Fri Sep 1 03:54:44 EDT 2006

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

isSublistOf needle haystack = any (isPrefixOf needle) (tails haystack)

More information about the Libraries mailing list