Created
February 18, 2016 13:07
-
-
Save daniloisr/a0c86a5e38796068dd92 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 Signal exposing (..) | |
import Window exposing (..) | |
import Mouse exposing (..) | |
import Graphics.Element exposing (..) | |
type Input = Win (Int, Int) | Move (Int, Int) | NoOp | |
type alias Model = { input: Input } | |
initModel : Model | |
initModel = { input = NoOp } | |
update : Input -> Model -> Model | |
update input model = { model | input = input } | |
main = | |
mergeMany | |
[ map Win dimensions | |
, map Move position | |
] | |
|> foldp update initModel | |
|> map show |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment