From 73e0437b7e7bdb12c220b5c222cce21a118f8d56 Mon Sep 17 00:00:00 2001 From: AttilaMihaly Date: Tue, 17 Dec 2024 10:14:24 +0100 Subject: [PATCH] Revert sample code. --- cli/src/Morphir/Web/TryMorphir.elm | 55 +++--------------------------- 1 file changed, 4 insertions(+), 51 deletions(-) diff --git a/cli/src/Morphir/Web/TryMorphir.elm b/cli/src/Morphir/Web/TryMorphir.elm index bd698409c..f9983eaf9 100644 --- a/cli/src/Morphir/Web/TryMorphir.elm +++ b/cli/src/Morphir/Web/TryMorphir.elm @@ -592,12 +592,6 @@ sampleSourcePrefix = sampleSource : String sampleSource = """ --- Surfboard Rental - -type Response - = Rejected - | Reserved Int - request : Bool -> Int -> Int -> Response request allowPartial availableSurfboards requestedSurfboards = if availableSurfboards < requestedSurfboards then @@ -611,48 +605,7 @@ request allowPartial availableSurfboards requestedSurfboards = Reserved requestedSurfboards --- BMI Calculation - -type ObesityClassification - = Underweight - | NormalWeight - | Overweight - | Obesity - -{-| Calculate the obesity description based on the BMI value. --} -obesityDescription : Float -> ObesityClassification -obesityDescription bmi = - if bmi < 18.5 then - Underweight - else if bmi < 24.9 then - NormalWeight - else if bmi < 29.9 then - Overweight - else - Obesity - -{-| Calculate the BMI range based on the obesity classification. --} -bmiRange : ObesityClassification -> (Float, Float) -bmiRange classification = - case classification of - Underweight -> - (0.0, 18.4) - NormalWeight -> - (18.5, 24.9) - Overweight -> - (25.0, 29.9) - Obesity -> - (30.0, 1/0) - - --- Recursion - -factorial : Int -> Int -factorial n = - if n <= 0 then - 1 - else - n * factorial (n - 1) - """ +type Response + = Rejected + | Reserved Int + """