diff options
author | Joris Guyonvarch | 2015-03-22 12:53:55 +0100 |
---|---|---|
committer | Joris Guyonvarch | 2015-03-22 12:53:55 +0100 |
commit | 2abb8ffa46cbe86deedb9ddcbb9b042b51285feb (patch) | |
tree | 3756c16ccdf8b61000767637db0807f3d40e12cc /src/Update/UpdateTimerEdition.elm | |
parent | ce4580451def7e86d0f67d2c353ac65239e17fd1 (diff) |
Editing name first draft
Diffstat (limited to 'src/Update/UpdateTimerEdition.elm')
-rw-r--r-- | src/Update/UpdateTimerEdition.elm | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/Update/UpdateTimerEdition.elm b/src/Update/UpdateTimerEdition.elm deleted file mode 100644 index e9493eb..0000000 --- a/src/Update/UpdateTimerEdition.elm +++ /dev/null @@ -1,34 +0,0 @@ -module Update.UpdateTimerEdition - ( updateTimerEdition - , TimerEditionAction(..) - ) where - -import Char (..) - -import Model.TimerEdition (..) - -import Utils.List (..) - -type TimerEditionAction = - DeleteLast - | AddNumber KeyCode - -updateTimerEdition : TimerEditionAction -> TimerEdition -> TimerEdition -updateTimerEdition action timerEdition = - case action of - DeleteLast -> - case maybeTail timerEdition.numbers of - Just tailNumbers -> - { timerEdition | numbers <- tailNumbers } - Nothing -> - timerEdition - AddNumber keyCode -> - case keyCodeToNumberChar keyCode of - Just char -> - if isDigit char - then - { timerEdition | numbers <- char :: timerEdition.numbers } - else - timerEdition - Nothing -> - timerEdition |