each n xs = map (xs!!) [0, n .. length xs - 1] main = print $ each 2 [0..9]
Standard input is empty
[0,2,4,6,8]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!