Thanks guys for all your help, finally through code, sweat and tears i have found the solution;
 
isSubStrand:: String -> String -> Bool
isSubStrand [] [] = True
isSubStrand [] (y:ys) = False
isSubStrand (x:xs) [] = False
isSubStrand (x:xs) (y:ys)
   | length(x:xs)>length(y:ys) = False
   | take (length (x:xs)) (y:ys)==(x:xs) = True
   | otherwise = isSubStrand (x:xs) ys
thanks again
Peter Stranney
 

Ketil Malde <ketil+haskell@ii.uib.no> wrote:
Remi Turk 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?)

-kzm
--
If I haven't seen further, it is by standing in the footprints of giants


Peter Stranney


Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.