On Sun, Oct 17, 2004 at 08:05:09PM +0200, Ketil Malde wrote:
> Remi Turk <[EMAIL PROTECTED]> writes:
> 
> > You might also want to look at the earlier `any prefix of tails'
> > suggestion, as it makes the solution a rather simple one-liner.
> 
> Wouldn't that be looking for a sub*string*, and not a (general)
> sub*sequence* (which I think does not have to be contigous?)

Hm, not "substring" as in String at least, but that solution does
give the following results:

Prelude List> sub "ell" "hello"
True
Prelude List> sub [3..5] [1..10]
True
Prelude List> sub [2,4] [1..5]
False
Prelude List> sub [2..6] [1..5]
False

Do you mean "subset" with "subsequence"?

Groetjes,
Remi

-- 
Nobody can be exactly like me. Even I have trouble doing it.
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to