aboutsummaryrefslogtreecommitdiff
path: root/src/Update/UpdateTimerEdition.elm
blob: cff39f7d75fa7ea654743a465dc2caa1bfa47eb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module Update.UpdateTimerEdition
  ( updateTimerEdition
  ) where

import Char (..)

import Model.TimerEdition (..)

updateTimerEdition : Maybe Char -> TimerEdition -> TimerEdition
updateTimerEdition maybeChar timerEdition =
  case maybeChar of
    Just char ->
      if isDigit char
        then
          { timerEdition | numbers <- char :: timerEdition.numbers }
        else
          timerEdition
    Nothing ->
      timerEdition