guide.elm-lang.org
guide.elm-lang.org copied to clipboard
clarify that Decode.map2 takes a constructor function as first argument
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.