The following files exists in this folder. Click to view.
default.txt1 lines ASCII Unix (LF) module Examples.Hello (main, Point, Tree(..)) where
import Html exposing (Html, span, text)
import Html.Attributes exposing (..)
import Time
main : Html
main =
span [class "welcome-message"] [text "Hello, World!"]
type alias Point = { x : Int, y : Int }
type Tree a = Leaf a | Node (Tree a) a (Tree a)
flatten : Tree a -> List a
flatten t =
case t of
Leaf a -> [a]
Node l a r -> flatten l ++ a :: flatten r
-- outgoing values
port time : Signal Float
port time = Time.every 1000