Created
November 21, 2016 12:18
-
-
Save nojaf/eab421472fcbbfe4abcfa8da4ff10fa0 to your computer and use it in GitHub Desktop.
Empty elm structure
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
import Html exposing (Html, div, text, program) | |
type alias Model = | |
String | |
init : ( Model, Cmd Msg ) | |
init = | |
( "Hello", Cmd.none ) | |
type Msg | |
= NoOp | |
view : Model -> Html Msg | |
view model = | |
div [] | |
[ text model ] | |
update : Msg -> Model -> ( Model, Cmd Msg ) | |
update msg model = | |
case msg of | |
NoOp -> | |
( model, Cmd.none ) | |
subscriptions : Model -> Sub Msg | |
subscriptions model = | |
Sub.none | |
main : Program Never Model Msg | |
main = | |
program | |
{ init = init | |
, view = view | |
, update = update | |
, subscriptions = subscriptions | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment