From d48cafebb277e4ad4b31e883cbe4f55eef9ea4a4 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 29 May 2021 19:24:41 +0200 Subject: Rewrite in TypeScript --- src/Indicator.purs | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 src/Indicator.purs (limited to 'src/Indicator.purs') diff --git a/src/Indicator.purs b/src/Indicator.purs deleted file mode 100644 index 29daa4f..0000000 --- a/src/Indicator.purs +++ /dev/null @@ -1,20 +0,0 @@ -module Indicator - ( Indicator(..) - , className - , fromGlycemicLoad - ) where - -import Prelude - -data Indicator = Good | Medium | Bad - -className :: Indicator -> String -className Good = "good" -className Medium = "medium" -className Bad = "bad" - -fromGlycemicLoad :: Number -> Indicator -fromGlycemicLoad n - | n <= 8.0 = Good - | n <= 20.0 = Medium - | otherwise = Bad -- cgit v1.2.3