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

Body.map #113

Open
adauguet opened this issue Oct 6, 2021 · 1 comment · May be fixed by #114
Open

Body.map #113

adauguet opened this issue Oct 6, 2021 · 1 comment · May be fixed by #114

Comments

@adauguet
Copy link

adauguet commented Oct 6, 2021

Would it make sense to have a map : (a -> b) -> Body a -> Body b function?

Inspiration comes from classic TEA, Html.map, Cmd.map, etc.

I would like to define some bodies outside the main module but it is hard because there are bind by the same data.

It looks trivial to implement, but can only be done at package level since the Body type is opaque.

@adauguet
Copy link
Author

adauguet commented Oct 6, 2021

It could also allow sharing some bodies code between packages.

@adauguet adauguet linked a pull request Oct 6, 2021 that will close this issue
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 a pull request may close this issue.

1 participant