I am new to Haskell and play with some code . I was confused by the following GHCI session:
*Main> :l golden_cross_sample.hs *Main> :t stateProcessors stateProcessors :: [State GoldenCrossState String] *Main> :t sequence sequence :: Monad m => [ma] -> m [a] *Main> let res1 = (sequence stateProcessors) *Main> :t res1 res1 :: StateT GoldenCrossState Identity [String]
From a signature of type sequence I expected res1 to be of type State GoldenCrossState [String] . Why is this not so?
source share