Completes the Json.Decode simplifications listed in #2 and more.
-- the following simplifications for map3 work for all Json.Decode.mapN
Json.Decode.map3 f (Json.Decode.succeed a) (Json.Decode.succeed b) (Json.Decode.succeed c)
--> Json.Decode.succeed (f a b c)
Json.Decode.map3 f (Json.Decode.succeed a) (Json.Decode.fail x) thirdDecoder
--> Json.Decode.fail x
Json.Decode.map3 f firstDecoder (Json.Decode.fail x) thirdDecoder
--> Json.Decode.map2 f firstDecoder (Json.Decode.fail x)
Bonus: Make using mapN checks more concise by using argCount to infer the n
Completes the
Json.Decode
simplifications listed in #2 and more.Bonus: Make using mapN checks more concise by using
argCount
to infer then