Created
August 6, 2015 08:46
-
-
Save brendanzab/c8e6eb1f3defd2485c12 to your computer and use it in GitHub Desktop.
This file contains 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 Graphics.Element exposing (Element, show) | |
import Mouse | |
type alias Model = | |
{ n : Int | |
} | |
init : Model | |
init = | |
{ n = 0 | |
} | |
update : Input -> Model -> Model | |
update () model = | |
{ model | n <- model.n + 1 } | |
view : Model -> Element | |
view model = | |
show model | |
type alias Input = () | |
models : Signal Model | |
models = Signal.foldp update init Mouse.clicks | |
main : Signal Element | |
main = | |
Signal.map view models |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment