
#10168: generalize filterM, mapAndUnzipM, zipWithM, zipWithM_, replicateM, replicateM_ -------------------------------------+------------------------------------- Reporter: strake888 | Owner: Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: Core Libraries | Version: 7.10.1-rc1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by strake888): You mean {{{#!hs replicateM 0 _ = pure [] replicateM n x = liftA2 (:) x (replicateM (n-1) x) }}} ? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10168#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler