[Haskell-beginners] Code golf

Tilmann t_gass at gmx.de
Thu May 19 13:12:26 UTC 2016


given:

inputA :: IO String

inputB :: IO String

update :: String -> String -> IO ()

Is there an elegant way to refactor / code golf this:

doIt :: IO ()
doIt = do
   a <- inputA
   b <- inputB
   update a b

liftM2 doesn't work in this case..

Thank you!


More information about the Beginners mailing list