Can\'t figure out how to merge two lists in the following way in Haskell:
INPUT: [1,2,3,4,5] [11,12,13,14] OUTPUT: [1,11,2,12,3,13,4,14,5]
EDIT: Take a look at Ed'ka's answer and comments!
Another possibility:
merge xs ys = concatMap (\(x,y) -> [x,y]) (zip xs ys)
Or, if you like Applicative:
merge xs ys = concat $ getZipList $ (\x y -> [x,y]) <$> ZipList xs <*> ZipList ys