[Haskell-cafe] file line operation perhaps need loop

Henning Thielemann lemming at henning-thielemann.de
Wed Jul 20 04:14:10 EDT 2005


On Wed, 20 Jul 2005, Sun Yi Ming wrote:

> mix :: [a] -> [a] -> [a]
> mix [] ys = ys
> mix xs [] = xs
> mix (x:xs) (y:ys) = [x,y] ++ mix xs ys

mix xs ys = concat (Data.List.transpose [xs,ys])



More information about the Haskell-Cafe mailing list