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

Implement Maybe monad #4

Closed
5 tasks done
katunilya opened this issue Apr 14, 2022 · 0 comments · Fixed by #32
Closed
5 tasks done

Implement Maybe monad #4

katunilya opened this issue Apr 14, 2022 · 0 comments · Fixed by #32
Assignees
Labels
feature New functionality and improvements for old one

Comments

@katunilya
Copy link
Owner

katunilya commented Apr 14, 2022

  • Maybe state
  • Wrapper around Some value (from Maybe)
  • Mock value for Nothing from (Maybe based on _Nothing singleton type)
  • Recovery function recover: V -> (Maybe[T] -> Maybe[T] | Maybe[V])
  • Choose function choose: (Maybe[T] -> Maybe[V]) list -> Maybe[V]
@katunilya katunilya added the feature New functionality and improvements for old one label Apr 14, 2022
@katunilya katunilya self-assigned this Apr 14, 2022
@katunilya katunilya added this to the v0.2.3 milestone Apr 19, 2022
katunilya added a commit that referenced this issue Apr 23, 2022
* `Maybe` container
* `Some` container
* `_Nothing` singletone for empty value
* `Nothing` instance
* `bind` function
katunilya added a commit that referenced this issue Apr 23, 2022
* `test_nothing_is_singleton`
* `test_bind` (including >> syntax)
katunilya added a commit that referenced this issue Apr 23, 2022
katunilya added a commit that referenced this issue Apr 23, 2022
katunilya added a commit that referenced this issue Apr 23, 2022
katunilya added a commit that referenced this issue Apr 23, 2022
@katunilya katunilya pinned this issue Apr 23, 2022
katunilya added a commit that referenced this issue Apr 23, 2022
* Add Maybe base impl (#4)

* `Maybe` container
* `Some` container
* `_Nothing` singletone for empty value
* `Nothing` instance
* `bind` function

* Add tests for `Maybe` monad (#4)

* `test_nothing_is_singleton`
* `test_bind` (including >> syntax)

* Upd commit template (#4)

* Add dedicated __rshift__ (#4)

* Add `maybe.recover` with tests (#4)

* Add `maybe.choose` (#4)

* Replace use of Callable with MaybeFunc (#4)
@katunilya katunilya unpinned this issue Apr 23, 2022
katunilya added a commit that referenced this issue May 1, 2022
* Add Maybe base impl (#4)

* `Maybe` container
* `Some` container
* `_Nothing` singletone for empty value
* `Nothing` instance
* `bind` function

* Add tests for `Maybe` monad (#4)

* `test_nothing_is_singleton`
* `test_bind` (including >> syntax)

* Upd commit template (#4)

* Add dedicated __rshift__ (#4)

* Add `maybe.recover` with tests (#4)

* Add `maybe.choose` (#4)

* Replace use of Callable with MaybeFunc (#4)
katunilya pushed a commit that referenced this issue May 1, 2022
Resolve "Future monad"

Closes #4

See merge request katunilya/mona!3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality and improvements for old one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant