(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import Html exposing (Html, text, div) | |
import Html.App as Html | |
import Keyboard exposing (..) | |
import Char exposing (..) | |
main = | |
Html.program | |
{ init = init | |
, view = view | |
, update = update |
import Html exposing (Html, text, div) | |
import Html.App as Html | |
import Window exposing (..) | |
main = | |
Html.program | |
{ init = init | |
, view = view | |
, update = update | |
, subscriptions = subscriptions |
import Html exposing (Html, text, div) | |
import Html.App as Html | |
import Mouse exposing (..) | |
main = | |
Html.program | |
{ init = init | |
, view = view | |
, update = update | |
, subscriptions = subscriptions |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
module Game (..) where | |
import Graphics.Element exposing (..) | |
import Graphics.Collage exposing (..) | |
import Color exposing (red, blue, gray, green) | |
import Keyboard | |
import Window | |
-- ALIAS |
type Action | |
= Updated Response | |
| APIError Error | |
update : Action -> Model -> ( Model, Effects Action ) | |
update action model = | |
case action of | |
Updated response -> -- do things | |
APIError error -> | |
let |
module Main (..) where | |
import Graphics.Element exposing (..) | |
import Time exposing (Time, second) | |
import Effects exposing (Effects) | |
import Keyboard | |
type alias DebounceState = | |
Maybe |
module CustomStartApp (start, App, Config) where | |
import Html exposing (Html) | |
import Effects exposing (Effects, Never) | |
import Task | |
type alias Config model action portAction = | |
{ init : ( model, Effects action, portAction ) | |
, update : action -> model -> ( model, Effects action, Maybe portAction ) |
{ | |
"version": "1.0.0", | |
"summary": "helpful summary of your project, less than 80 characters", | |
"repository": "https://github.com/user/project.git", | |
"license": "BSD3", | |
"source-directories": [ | |
"." | |
], | |
"exposed-modules": [], | |
"dependencies": { |
module Main where | |
import Html exposing (Html, text, p) | |
import Signal exposing (Address) | |
import Effects exposing (Effects, Never) | |
import Json.Decode as Json exposing ((:=)) | |
import StartApp exposing (start) | |
import Task | |
import Http |