blob: 03eb67f23d19687a6b2b70fc384b8947e7a0bc27 (
plain)
1
2
3
4
5
6
7
8
9
|
{-# LANGUAGE TransformListComp #-}
-- GHC 7.0.1 failed because the renamer didn't attach
-- all the used variables to the TransformListComp constructor
module List where
intersectFront :: Ord a => [a] -> [a] -> [a]
intersectFront xs ys = [x | (x,y) <- zip xs ys, then takeWhile by x == y]
|