Closed BrianHicks closed 7 years ago
Lazy requires a function that takes unit and returns Decoder a. Why is the function necessary?
Decoder a
Concretely, in what case is the following not valid?
myLazy : Decoder a -> Decoder a myLazy decoder = Json.Decode.Extra.lazy (\_ -> decoder)
Oh duh, because it needs to be separated by a lambda from its definition in recursive data structures. Duh. Nevermind me, that was a brain fart :)
Lazy requires a function that takes unit and returns
Decoder a
. Why is the function necessary?Concretely, in what case is the following not valid?