Pierre-Etienne Meunier <pierreetienne.meun...@gmail.com> writes: > This way : > > do > times<-mapM PF.getFileStatus filenames >>= return.(map > PF.modificationTime) > > Or also : > > do > times<-mapM (PF.getFileStatus >>= (return.(PF.modificationTime))) > filenames > let sorted=... > > I do not know exactly how ghc compiles the IO monad, but it seems to > me that the latter would allocate a little less.
List fusion probably converts them to the same core (you can always use ghc-core to verify this if you care). -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe