Check out a free preview of the full Advanced Elm course:
The "Decoding Exercise" Lesson is part of the full, Advanced Elm course featured in this preview video. Here's what you'd learn in this lesson:

Students are instructed to decode a Time.Posix value using Decode.andThen.

Get Unlimited Access Now

Transcript from the "Decoding Exercise" Lesson

[00:00:00]
>> Richard Feldman: Let's take a look at the exercise.
>> Richard Feldman: Whoa. What's going on there?
>> Richard Feldman: All right. So in here, we have TODOs in two files. One is timestamp.elm.
>> Richard Feldman: And it says, use the following function to decode this time.pauseX value. And so it's a 1.2 time which takes a string and a result time.pauseX.

[00:00:33] I'm sorry turns the results. And if you are awake while we're watching these slides. This may be a familiar problem to solve, because we just saw how to solve it, using a good friend, decode.andthen. So that's the first one, is sort of recreating that here. The other one in the readme is sourceauthor.elm.

[00:00:52] And inside here, we have a TODO, Use this profile and username to decode an author. Hint, decoder help will help here, but slightly altering its type may make things easier.