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

add firstJustMap, allJustMap #44

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

lue-bird
Copy link
Collaborator

@lue-bird lue-bird commented Jun 5, 2023

allJustMap is only Just all unpacked values when all elements are mapped to Just

firstJustMap is a more general function of find suggested in #12 which returns the first unpacked value that maps to Just.

The -Map prefix names should be consistent with filterMap, concatMap, ..., where "filter", "concat", ... are the actions performed after applying the map.

The "firstJust" and "allJust" should be easier to understand than "find" (from what side?) and "traverse"/"sequence"/"combine" (all Ok?, all Just? all non-empty? ...).

Should we add firstOkMap and allOkMap too?

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

Successfully merging this pull request may close these issues.

1 participant