Add note about Decode.map2

This commit is contained in:
Richard Feldman
2018-08-05 11:15:41 -04:00
parent 42a4127697
commit e374fd8b64

View File

@@ -153,6 +153,15 @@ fullDecoder maybeCred =
|> required "body" "👉 TODO use `Body.decoder` (which is a `Decoder Body`) to decode the body into this Article Full"
{- If you're unfamiliar with Decode Pipeline, here's how would look without it:
Decode.map2 Article
(internalsDecoder maybeCred)
(Decode.field "body" "use `Body.decoder` (which is a `Decoder Body`) to decode the body into this Article Full")
-}
internalsDecoder : Maybe Cred -> Decoder Internals
internalsDecoder maybeCred =
Decode.succeed Internals