Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better names for evalState and execState #125

Open
tomjaguarpaw opened this issue Oct 26, 2022 · 3 comments
Open

Better names for evalState and execState #125

tomjaguarpaw opened this issue Oct 26, 2022 · 3 comments

Comments

@tomjaguarpaw
Copy link
Owner

No description provided.

@kindaro
Copy link

kindaro commented Nov 8, 2022

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?

@tomjaguarpaw
Copy link
Owner Author

To start with, let's remember this mnemonic device: "evalState is invaluable" because it can be used to replicate execState (but not vice versa).

@MatthijsBlom
Copy link

This is how I have been remembering them:

  • runState is the one from the record (inferrable from prefix run-)
  • evalSatte yields a value – just like regular evaluation
  • execState is the other one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants