User icon
#nightymorning October 14->15

For my future self's convenience:
f :: Int -> [Int] -> [Int]
f a (1:xs) = a : f (3-a) xs
f a (2:xs) = a : a : f (3-a) xs

x :: [Int]
x = 2 : (f 1 x)

main = print (1 : 2 : x)
Comments