Skip to main content
8 events
when toggle format what by license comment
Jan 8, 2017 at 15:03 history edited Vogel612 CC BY-SA 3.0
syntax-highlighting fixes
Nov 9, 2016 at 8:27 comment added A. Lindberg The createdb does writeFile name ++ ".txt" but I need the name
Nov 9, 2016 at 2:40 comment added Gurkenglas Doesn't my implementation above already do that?
Nov 8, 2016 at 23:40 comment added A. Lindberg I kinda get it. For the 'createdb' function I need the reverse behaviour of all the other functions however. I tried to write it and ended up with this: ("a", _, f) : _ -> getName >>= maybe menu (\x -> do y <- getFile x; if isJust y then f Nothing else f (Just x)) Any better way to write this?
Nov 8, 2016 at 23:14 vote accept A. Lindberg
Nov 8, 2016 at 21:17 comment added Gurkenglas a >>= b is another way to write do x <- a; b x. a >=> b is another way to write \x -> do y <- a x; b y. You'll need to import Control.Monad for that one.
Nov 8, 2016 at 20:20 comment added A. Lindberg Much better. thank you. But is the >=> a typo? Not familiar with that and >>=
Nov 8, 2016 at 20:06 history answered Gurkenglas CC BY-SA 3.0