RosettaCodeData/Task/Reverse-a-string/Elm/reverse-a-string.elm

18 lines
356 B
Elm
Raw Permalink Normal View History

2024-03-06 22:25:12 -08:00
module Main exposing (main)
2023-07-01 11:58:00 -04:00
2024-03-06 22:25:12 -08:00
import Html exposing (Html, text, div, p)
import Html.Attributes exposing (style)
2023-07-01 11:58:00 -04:00
2024-03-06 22:25:12 -08:00
change myText =
text ("reverse " ++ myText
++ " = " ++ String.reverse myText)
2023-07-01 11:58:00 -04:00
2024-03-06 22:25:12 -08:00
main =
div [style "margin" "5%", style "font-size" "1.5em"]
[change "asda"
, p [] [change "asu-asu"]
, p [] [change "Hello!"]
2023-07-01 11:58:00 -04:00
]