Help with possible Haskell type inference quiz questions
- by Linda Cohen
foldr:: (a -> b -> b) -> b -> [a] -> b
map :: (a -> b) -> [a] -> [b]
mys :: a -> a
(.) :: (a -> b) -> (c -> a) -> c -> b
what is inferred type of:
a.map mys ::
b.mys map ::
c.foldr map ::
d.foldr map.mys ::
I've tried to create mys myself using mys n = n + 2 but the type of that is
mys :: Num a =>…