This file contains hidden or 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 Html exposing (Html) | |
import Debug | |
import Array exposing (Array) | |
import Html.Attributes as HtmlA -- exposing (..) | |
import Html.Events as HtmlE --exposing (on, onClick, targetChecked) | |
import Signal exposing (Address) | |
import StartApp.Simple as StartApp | |
main = |
This file contains hidden or 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 Html exposing (Html, div, text, input, button) | |
import Html.Attributes exposing (value, placeholder) | |
import Html.Events exposing (on, targetValue, onClick) | |
import Signal as Signal | |
import List exposing (head, tail) | |
import Maybe | |
import Debug | |
isUpdate ha = case ha of | |
Just (Update _ _) -> True |
This file contains hidden or 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
type Body x = { pos:(Int,Int), wrap : x } | |
type Bubble = { radius: Int } | |
type Box = { w: Int, h: Int } | |
data Wrap = WBox Box | WBubble Bubble | |
mv: (Int,Int) -> Body a -> Body a | |
mv (x,y) body = | |
let (x0,y0)= body.pos | |
in { body | pos <- (x0+x, y0+y)} |