Add note about Decode.map2
This commit is contained in:
@@ -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"
|
|> 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 : Maybe Cred -> Decoder Internals
|
||||||
internalsDecoder maybeCred =
|
internalsDecoder maybeCred =
|
||||||
Decode.succeed Internals
|
Decode.succeed Internals
|
||||||
|
|||||||
Reference in New Issue
Block a user