diff options
author | Joris | 2017-04-09 00:37:59 +0200 |
---|---|---|
committer | Joris | 2017-04-09 00:37:59 +0200 |
commit | 69be67a67503c0cb80153510083513f92de952bf (patch) | |
tree | 62de654cdcc1efeea25788f9e80d69b4f01a1fab /src/Indicator.purs | |
parent | ba548aafb4dcad5d7d69ef85b9b13e852facd31d (diff) |
Add food
Diffstat (limited to 'src/Indicator.purs')
-rw-r--r-- | src/Indicator.purs | 10 |
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 |