Skip to content

Commit 4b480a7

Browse files
committed
Pair.Red -> Pair.UpdateRed
1 parent b8d7efd commit 4b480a7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Main.elm

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ update msg model =
4040
let
4141
pair1 = Pair.update sub model.pair1
4242
totals = Totals.update (Totals.UpdateRed <| Pair.getRedNum pair1) model.totals
43-
pair2 = Pair.update (Pair.Red <| Pair.getRedNum pair1) model.pair2
43+
pair2 = Pair.update (Pair.UpdateRed <| Pair.getRedNum pair1) model.pair2
4444
in
4545
{ model | pair1 = pair1, totals = totals, pair2 = pair2 }
4646

4747
Pair2 sub ->
4848
let
4949
pair2 = Pair.update sub model.pair2
5050
totals = Totals.update (Totals.UpdateRed <| Pair.getRedNum pair2) model.totals
51-
pair1 = Pair.update (Pair.Red <| Pair.getRedNum pair2) model.pair1
51+
pair1 = Pair.update (Pair.UpdateRed <| Pair.getRedNum pair2) model.pair1
5252
in
5353
{ model | pair1 = pair1, totals = totals, pair2 = pair2 }

src/Pair.elm

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Pair exposing (Model, init, view, Msg(Red), update, getRedNum)
1+
module Pair exposing (Model, init, view, Msg(UpdateRed), update, getRedNum)
22

33
import Counter
44

@@ -30,7 +30,7 @@ view model =
3030
type Msg
3131
= PairRed Counter.Msg
3232
| PairGreen Counter.Msg
33-
| Red Int
33+
| UpdateRed Int
3434

3535
update : Msg -> Model -> Model
3636
update msg model =
@@ -41,7 +41,7 @@ update msg model =
4141
PairRed sub ->
4242
{ model | redCounter = Counter.update sub model.redCounter, totalClickCount = model.totalClickCount + 1 }
4343

44-
Red value ->
44+
UpdateRed value ->
4545
{ model | redCounter = Counter.update (Counter.SetNum value) model.redCounter }
4646

4747

0 commit comments

Comments
 (0)