Tutorial by Examples

Debug.log's second argument is always returned, so you could write code like the following and it would just work: update : Msg -> Model -> (Model, Cmd Msg) update msg model = case Debug.log "The Message" msg of Something -> ... Replacing case msg o...
At run time the following would display a list of url in your console and continue computation payload = [{url:..., title:...}, {url=..., title=...}] main = payload |> List.map .url -- only takes the url |> Debug.log " My list of URLs" -- pass the url...
0.170.18.0 At the time of writing (July 2016) elm-reactor has been temporarily stripped of its time traveling functionality. It's possible to get it, though, using the jinjor/elm-time-travel package. It's usage mirrors Html.App or Navigation modules' program* functions, for example instead of: im...
case thing of Cat -> meow Bike -> ride Sandwich -> eat _ -> Debug.crash "Not yet implemented" You can use Debug.crash when you want the program to fail, typically used when you're in the middle of implementing a case ex...

Page 1 of 1