Skip to content

Instantly share code, notes, and snippets.

@jergason
Created July 10, 2015 06:11
Show Gist options
  • Save jergason/4e49d78e9b39aee507bb to your computer and use it in GitHub Desktop.
Save jergason/4e49d78e9b39aee507bb to your computer and use it in GitHub Desktop.
i am the best at elm
import Html exposing (h1, div, text)
import Mouse
renderMouse : (Int, Int) -> Html.Html
renderMouse pos =
div [] [
h1 [] [text ("x" ++ (toString (fst pos)))],
h1 [] [text ("y" ++ (toString (snd pos)))]
]
main : Signal Html.Html
main = Signal.map renderMouse Mouse.position
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment