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

Chore: Monadic operations for memory values #45

Closed
wants to merge 1 commit into from

Conversation

ElijahVlasov
Copy link
Contributor

@ElijahVlasov ElijahVlasov commented Sep 8, 2023

This doesn't pretend to be a significant improvement :) I think it's kind of nice to take an implementation of Either type so that we don't need to implement one on our own. Feel free to discard this ofc! Just a suggestion

Copy link
Contributor

@rodrigo-pino rodrigo-pino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, when I started working with Go, I craved for some fp. @joshklop wanted even to completely remove the existence of MemoryValue by using an interface, I think that is the right call long term wise. Since this doesn't deter us from that final goal, it is good for me!

felt *f.Element
address *MemoryAddress
}
type MemoryValue memoryValue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could directly type:

type MemoryValue mo.Either[*f.Element, *MemoryAddress]

I think the type memoryValue is not used anywhere else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use its generated cast function

@rodrigo-pino
Copy link
Contributor

I am closing this since MemoryValue has evolved a lot and it is not compatible with current changes

@rodrigo-pino rodrigo-pino deleted the chore-monadic branch October 13, 2023 02:22
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

Successfully merging this pull request may close these issues.

2 participants