
31 Aug
2012
31 Aug
'12
2:15 p.m.
Brent Yorgey
*intercalate :: (Eq t) => [t] -> [t] -> [t]* *intercalate (x:xs) (y:ys)* * | xt == [] = []* * | yt == [] = []* * | otherwise = x : y : intercalate xs ys* * where xt=(x:xs)* * yt=(y:ys)*
I should also point out that the tests xt == [] and yt == [] will never be true! That is because xt is defined to be (x:xs) and yt is (y:ys).
That's actually not true. See his 'where' clause at the bottom. Greets, Ertugrul -- Not to be or to be and (not to be or to be and (not to be or to be and (not to be or to be and ... that is the list monad.