Closed JustusAdam closed 6 years ago
The use in the README is technically correct, since it later applies fst
to the result and returns the state, not the result. The use in the documentation is, however, incorrect in the way you’ve noticed.
Oh. Yes you are correct. I completely skipped the fst
.
Should I change the README back to runState
or should I drop the fst
and make it execState
?
I think either works. The example in the README was inherited from freer
and freer-effects
, and I’m not sure it’s even an especially good one.
I reverted the change in the REAME.
Thanks!
In the tutorial and the readme you use
runState
, which returns(a,s)
whereas what the rest of the code suggests is that you only want to returna
, ergoevalState
is needed.