Installed

elm/browser
1.0.2
elm/core
1.0.5
elm/html
1.0.0
elm/random
1.0.0

Registry

elm/http
2.0.0
elm/time
1.0.0
elm/file
1.0.5
elm/json
1.1.3
elm/svg
1.0.1
evancz/elm-playground
1.0.3
elm-explorations/webgl
1.1.3
w0rm/elm-physics
5.1.3
rtfeldman/elm-css
18.0.0
mdgriffith/elm-ui
1.1.8
​x
    , div [ style "font-size" "12em" ] [ text (viewCard model.card) ]
 
1
-- Press a button to draw a random card.
2
--
3
-- Dependencies:
4
--   elm install elm/random
5
--
6
​
7
import Browser
8
import Html exposing (..)
9
import Html.Attributes exposing (style)
10
import Html.Events exposing (..)
11
import Random
12
​
13
​
14
​
15
-- MAIN
16
​
17
​
18
main =
19
  Browser.element
20
    { init = init
21
    , update = update
22
    , subscriptions = subscriptions
23
    , view = view
24
    }
25
​
26
​
27
​
28
-- MODEL
29
​
30
​
31
type alias Model =
32
  { card : Card
33
  }
34
​
35
​
36
init : () -> (Model, Cmd Msg)
37
init _ =
38
  ( Model Three
39
  , Cmd.none
40
  )
41
​
42
​
43
type Card
44
  = Ace
45
  | Two
46
  | Three
47
  | Four
48
  | Five
49
  | Six