[Haskell-cafe] Re: Subsequence near solved hopefully

2004-10-17 Thread Peter Simons
Sam Mason writes: Just to muddy the water a bit. . . What happens if the second string is infinite? This version should do it: isSubSeq :: (Eq a) = [a] - [a] - Bool isSubSeq [] _= True isSubSeq _ []= False isSubSeq (x:xs) (y:ys) | x == y= isSubSeq xs ys |

Re: [Haskell-cafe] Re: Subsequence near solved hopefully

2004-10-17 Thread Remi Turk
On Sun, Oct 17, 2004 at 10:53:37PM +0100, Sam Mason wrote: Peter Simons wrote: This version should do it: isSubSeq :: (Eq a) = [a] - [a] - Bool isSubSeq [] _= True isSubSeq _ []= False isSubSeq (x:xs) (y:ys) | x == y= isSubSeq xs ys