From 2abb8ffa46cbe86deedb9ddcbb9b042b51285feb Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sun, 22 Mar 2015 12:53:55 +0100 Subject: Editing name first draft --- src/Update/UpdateTimerEdition.elm | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/Update/UpdateTimerEdition.elm (limited to 'src/Update/UpdateTimerEdition.elm') 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 -- cgit v1.2.3