daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Nov 15th, 2018 92 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. -- INIT
  2. init : Model
  3. init =
  4. { content = "" }
  5.  
  6.  
  7. -- UPDATE
  8. type Msg
  9. = Change String
  10. update : Msg -> Model -> Model
  11. update msg model =
  12. case msg of
  13. Change newContent ->
  14. { model | content = newContent }
  15.  
  16.  
  17. -- VIEW
  18. view : Model -> Html Msg
  19. view model =
  20. div []
  21. [ input [ placeholder "Text to reverse", value model.content, onInput Change ] []
  22. , div [] [ text (String.reverse model.content) ]
  23. ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top