From cd3b37adebca99138fad1acca37908183036ace9 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Mon, 16 Mar 2015 00:15:05 +0100 Subject: Initial commit, can create and name 5 minute timers, can toggle running state --- src/Update/UpdateTimer.elm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/Update/UpdateTimer.elm (limited to 'src/Update/UpdateTimer.elm') diff --git a/src/Update/UpdateTimer.elm b/src/Update/UpdateTimer.elm new file mode 100644 index 0000000..d8861b7 --- /dev/null +++ b/src/Update/UpdateTimer.elm @@ -0,0 +1,16 @@ +module Update.UpdateTimer + ( TimerAction(..) + , updateTimer + ) where + +import Model.Timer (..) +import Model.Id (..) + +type TimerAction = + ToggleRunning + +updateTimer : TimerAction -> Timer -> Timer +updateTimer action timer = + case action of + ToggleRunning -> + { timer | isRunning <- not timer.isRunning } -- cgit v1.2.3