import Data.Listmain = print.map head.group $ [1,1,2,2,3,3,3,1]
Standard input is empty
[1,2,3,1]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!