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

Create Identity monad #38

Open
seymourpoler opened this issue Sep 20, 2024 · 1 comment
Open

Create Identity monad #38

seymourpoler opened this issue Sep 20, 2024 · 1 comment
Labels
enhancement New feature or request hacktoberfest good issue to contribute in the hacktoberfest new monad Addition of new monad to library

Comments

@seymourpoler
Copy link

seymourpoler commented Sep 20, 2024

GIVEN a set of Monads
WHEN a developer wants to manage and Id
THEN Identity Monad

Breakdown:

  • Identity is the type for an Identity monad.
  • of(value) wraps a value in the Identity monad.
  • map(fn) applies a function fn to the value inside the monad.
  • chain(fn) applies a function that returns another monad.
  • identity(value) unwraps the value from the Identity monad.

source

@Marius9595
Copy link
Collaborator

I add this conversation from StackOverflow: https://stackoverflow.com/questions/28645505/why-is-identity-monad-useful

I think it is interesting.

@Marius9595 Marius9595 added enhancement New feature or request new monad Addition of new monad to library labels Sep 21, 2024
@Marius9595 Marius9595 added the hacktoberfest good issue to contribute in the hacktoberfest label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest good issue to contribute in the hacktoberfest new monad Addition of new monad to library
Projects
None yet
Development

No branches or pull requests

2 participants