import Html exposing (Html, text)
main =
Html.beginnerProgram { model = model, view = view, update = update }
type alias Model = String
model : Model
model =
""
|> update Wai
|> update Sugoi
|> update Tanoshii
|> update (Friends "クソリプ")
type Msg
= Wai
| Sugoi
| Tanoshii
| Friends String
update : Msg -> Model -> Model
update msg model =
case msg of
Wai ->
model ++ "わーい"
Sugoi ->
model ++ "すごーい"
Tanoshii ->
model ++ "たのしー"
Friends skill ->
model ++ "君は" ++ skill ++ "がとくいな、フレンズなんだね!!"
view : Model -> Html Msg
view model = text model
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
50