Miguel Mitrofanov wrote:
It has nothing to do with State; it actually works in List monad. "return y" is just another way of writing "[y]".
Actually, it seems that in this case return is from the ((->) a) monad, i.e. return=const.
f x y = x >>= return y = x >>= const y = (concat . map) (const y) x = concat (map (const y) x) Zun. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe