Created
April 12, 2016 07:32
-
-
Save doppioslash/700de426b4da1b1b716b3b2cbc9d30a4 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 (..) | |
import Mouse | |
type alias Model = ((Int, Int), Int) | |
model : Signal Model | |
model = Signal.map2 (,) Mouse.position clickCount | |
clickCount : Signal Int | |
clickCount = | |
Signal.foldp (\click total -> total + 1) 0 Mouse.clicks | |
main : Signal Element | |
main = | |
Signal.map show model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment