Advertisement
Guest User

Untitled

a guest
Apr 20th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import Graphics.Element (Element)
  2. import Text (asText)
  3. import Signal (Signal, map, foldp)
  4. import Time (fps)
  5.  
  6. type alias Point = {x: Float, y: Float}
  7.  
  8. main : Signal Element
  9. main = map asText <| foldp update {x=0, y=0} (fps 30)
  10.  
  11. update : Float -> Point -> Point
  12. update dt g = {g | x <- g.x + dt}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement