tilapia
                                
                                
                                
                                    tilapia copied to clipboard
                            
                            
                            
                        Better names for evalState and execState
Yep, I can never tell which one does what.
How about getFinalState and getReturnValue?
By the way, State is a tuple, and a tuple is a non-empty container, and a non-empty container is a comonad. Therefore, should getReturnValue be called extract: State state value → value?
To start with, let's remember this mnemonic device: "evalState is invaluable" because it can be used to replicate execState (but not vice versa).
This is how I have been remembering them:
runStateis the one from the record (inferrable from prefix run-)evalSatteyields a value – just like regular evaluationexecStateis the other one