Skip to content

Instantly share code, notes, and snippets.

@freakingawesome
Created December 30, 2015 18:28
Show Gist options
  • Save freakingawesome/5f445fedc16a1f18ac72 to your computer and use it in GitHub Desktop.
Save freakingawesome/5f445fedc16a1f18ac72 to your computer and use it in GitHub Desktop.
import Signal
import Html exposing (..)
import Html.Events exposing (..)
type Action
= NoOp
type alias Model =
{ message : String }
init : Model
init =
{ message = "Hello world!" }
actions : Signal.Mailbox Action
actions =
Signal.mailbox NoOp
update : Action -> Model -> Model
update action model =
case action of
NoOp -> model
model =
Signal.foldp update init actions.signal
main =
Signal.map (view actions.address) model
view address model =
div [] [ text model.message ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment