From 93ccdec1b7dd8f2f8905eaec91ed17e7ea0b58ab Mon Sep 17 00:00:00 2001 From: Cedd Burge Date: Sat, 9 Mar 2024 14:09:28 +0000 Subject: [PATCH] Update exercises/practice/allergies/.approaches/bitwise-and-dict/content.md Co-authored-by: Jie --- .../practice/allergies/.approaches/bitwise-and-dict/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/practice/allergies/.approaches/bitwise-and-dict/content.md b/exercises/practice/allergies/.approaches/bitwise-and-dict/content.md index 6726ded8..0b38562a 100644 --- a/exercises/practice/allergies/.approaches/bitwise-and-dict/content.md +++ b/exercises/practice/allergies/.approaches/bitwise-and-dict/content.md @@ -16,7 +16,7 @@ allergies = toList : Int -> List Allergy toList score = - Dict.foldr (\key value list -> if Bitwise.and (2 ^ key) score >= 0 then (value :: list) else list) [] allergies + Dict.foldr (\key value list -> if Bitwise.and (2 ^ (key - 1)) score > 0 then (value :: list) else list) [] allergies isAllergicTo : Allergy -> Int -> Bool isAllergicTo allergy score =