Created
April 23, 2017 00:19
-
-
Save arecvlohe/2fa96f0130ca85b84c26ea5322dacd9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (..) | |
import Html exposing (Html, text, div) | |
-- MODEL | |
type alias Model = | |
{ author : String | |
, quote : String | |
} | |
model : Model | |
model = | |
{ author = "Adam", quote = "Elm is a nice language to use!" } | |
-- VIEW | |
view : Model -> Html Msg | |
view model = | |
div [] | |
[ div [] [ text model.quote ] | |
, div [] [ text model.author ] | |
] | |
-- UPDATE | |
type Msg | |
= NoOp | |
update : Msg -> Model -> Model | |
update msg model = | |
case msg of | |
NoOp -> | |
model | |
-- MAIN | |
main : Program Never Model Msg | |
main = | |
Html.beginnerProgram | |
{ model = model | |
, update = update | |
, view = view | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment