Skip to content

Instantly share code, notes, and snippets.

@doppioslash
Created April 12, 2016 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doppioslash/700de426b4da1b1b716b3b2cbc9d30a4 to your computer and use it in GitHub Desktop.
Save doppioslash/700de426b4da1b1b716b3b2cbc9d30a4 to your computer and use it in GitHub Desktop.
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