You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
380 B
380 B
Exercises: Heavy Lifting
a = fmap (+1) $ read "[1]" :: [Int]
b = (fmap . fmap) (++ "lol") (Just ["Hi,", "Hello"])
c = fmap (*2) (\x -> x - 2)
d = fmap ((return '1' ++) . show) (\x -> [x,1..3])
- see block below
e :: IO Integer
e = let ioi = readIO "1" :: IO Integer
changed = fmap read (fmap (("123"++) . show) ioi)
in fmap (*3) changed