data Door = Open | Closed deriving Show
toggle Open = Closed
toggle Closed = Open
pass k = zipWith ($) (cycle $ replicate k id ++ [toggle])
run n = foldl (flip pass) (replicate n Closed) [0..n]
Do I need to add run 100 to the end of the example for it to actually do something?