main = do print$ f[1,2,3,3,3] print$ f[3,3] f s|x<-(==last s)=x.length.fst.span x.reverse$s
Standard input is empty
True False
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!