guide.elm-lang.org icon indicating copy to clipboard operation
guide.elm-lang.org copied to clipboard

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

Open lady3bean opened this issue 5 years ago • 0 comments

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.

lady3bean avatar Feb 26 '20 16:02 lady3bean