File tree 1 file changed +7
-15
lines changed 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -41,24 +41,16 @@ type Msg
41
41
42
42
43
43
update : Msg -> Model -> Model
44
- update msg model =
45
- case msg of
44
+ update message model =
45
+ case message of
46
46
Reset ->
47
47
init 0 0
48
48
49
- Top topMsg ->
50
- let
51
- newCounter =
52
- Counter . update topMsg model. topCounter
53
- in
54
- { model | topCounter = newCounter }
49
+ Top msg ->
50
+ { model | topCounter = Counter . update msg model. topCounter }
55
51
56
- Bottom bottomMsg ->
57
- let
58
- newCounter =
59
- Counter . update bottomMsg model. bottomCounter
60
- in
61
- { model | bottomCounter = newCounter }
52
+ Bottom msg ->
53
+ { model | bottomCounter = Counter . update msg model. bottomCounter }
62
54
63
55
64
56
@@ -72,4 +64,4 @@ view model =
72
64
[ App . map Top ( Counter . view model. topCounter)
73
65
, App . map Bottom ( Counter . view model. bottomCounter)
74
66
, button [ onClick Reset ] [ text " RESET" ]
75
- ]
67
+ ]
You can’t perform that action at this time.
0 commit comments