tracks/fsharp/exercises/allergies/Example.fs in trackler-2.2.1.44 vs tracks/fsharp/exercises/allergies/Example.fs in trackler-2.2.1.45
- old
+ new
@@ -10,12 +10,12 @@
| Tomatoes = 16
| Chocolate = 32
| Pollen = 64
| Cats = 128
-let allergicTo (allergen: Allergen) (codedAllergies: int) = codedAllergies &&& int allergen <> 0
+let allergicTo (codedAllergies: int) (allergen: Allergen) = codedAllergies &&& int allergen <> 0
-let allergies (codedAllergies: int) =
+let list (codedAllergies: int) =
Enum.GetValues(typeof<Allergen>)
|> Seq.cast<Allergen>
|> List.ofSeq
- |> List.filter (fun allergen -> allergicTo allergen codedAllergies)
+ |> List.filter (allergicTo codedAllergies)
\ No newline at end of file