aboutsummaryrefslogtreecommitdiff
path: root/src/Indicator.purs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Indicator.purs')
-rw-r--r--src/Indicator.purs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Indicator.purs b/src/Indicator.purs
index 536133d..39a98ca 100644
--- a/src/Indicator.purs
+++ b/src/Indicator.purs
@@ -1,6 +1,6 @@
module Indicator
( Indicator(..)
- , fromGlycemicIndex
+ , fromGlycemicLoad
) where
import Prelude
@@ -12,8 +12,8 @@ instance showIndicator :: Show Indicator where
show Medium = "Medium"
show Bad = "Bad"
-fromGlycemicIndex :: Int -> Indicator
-fromGlycemicIndex n
- | n < 40 = Good
- | n < 55 = Medium
+fromGlycemicLoad :: Number -> Indicator
+fromGlycemicLoad n
+ | n <= 10.0 = Good
+ | n < 20.0 = Medium
| otherwise = Bad