paf31 / purescript-book

Sources for the PureScript book
454 stars 370 forks source link

Chapter 11.4 The State Monad - type mismatch in example #132

Open crcdng opened 6 years ago

crcdng commented 6 years ago
> :paste
… execState (do
…   sumArray [1, 2, 3]
…   sumArray [4, 5]
…   sumArray [6]) 0
… ^D
21

sumArray takes Array Number, the array values here are of type Int