each n xs = map (xs!!) [0, n .. length xs - 1] main = print $ each 2 [0..9]