
12 Jul
2014
12 Jul
'14
10:24 a.m.
Hello all, I just started trying to understand Continuations, but my very first exercise already left me mystified. import Control.Monad.Cont resultIs :: Int -> Cont String String resultIs i = ContT $ f where f :: (String -> a) -> a f k = k ("result=" ++ show i) If resultIs returns a Cont String String, then f should be (String->String)->String, but that doesn't compile. Why is that so?