--- /dev/null
+{
+ "type": "application",
+ "source-directories": [
+ "src"
+ ],
+ "elm-version": "0.19.1",
+ "dependencies": {
+ "direct": {
+ "elm/browser": "1.0.2",
+ "elm/core": "1.0.5",
+ "elm/html": "1.0.0"
+ },
+ "indirect": {
+ "elm/json": "1.1.3",
+ "elm/time": "1.0.0",
+ "elm/url": "1.0.0",
+ "elm/virtual-dom": "1.0.3"
+ }
+ },
+ "test-dependencies": {
+ "direct": {},
+ "indirect": {}
+ }
+}
--- /dev/null
+module Main exposing (..)
+
+
+import Browser
+import Html exposing (Html, Attribute, div, input, text)
+import Html.Attributes exposing (..)
+import Html.Events exposing (onInput)
+
+
+
+-- MAIN
+
+
+main =
+ Browser.sandbox { init = init, update = update, view = view }
+
+
+
+-- MODEL
+
+
+type alias Model =
+ { content : String
+ }
+
+
+init : Model
+init =
+ { content = "" }
+
+
+
+-- UPDATE
+
+
+type Msg
+ = Change String
+
+
+update : Msg -> Model -> Model
+update msg model =
+ case msg of
+ Change newContent ->
+ { model | content = newContent }
+
+
+
+-- VIEW
+
+
+view : Model -> Html Msg
+view model =
+ div []
+ [ input [ placeholder "Text to reverse", value model.content, onInput Change ] []
+ , div [] [ text (String.reverse model.content) ]
+ ]