From 69be67a67503c0cb80153510083513f92de952bf Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 9 Apr 2017 00:37:59 +0200 Subject: Add food --- src/Indicator.purs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Indicator.purs') 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 -- cgit v1.2.3