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

clarify that Decode.map2 takes a constructor function as first argument #243

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lady3bean
Copy link

I noticed that the section on Json.Decode.map2 implies that map2 takes two decoders as its arguments, when in fact it takes three, the first one being a constructor function. This PR clarifies what the first argument to map2 is.

Yesterday I was working on decoding for an opaque type, and thus had to write my own constructor function in order to build a decoder. It was then that I realized the docs here are a little misleading, since they don't mention that the first argument has to be a constructor function.

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.

1 participant