# HG changeset patch # User IBBoard # Date 1560628268 -3600 # Node ID d6855f9d7eae759b225e2d32adf57636516fc06c # Parent 2b5341fc4555ec1b1cebd45b24f4ff34dde02715 Add a note about exhaustive vs filtered brute-forcing diff -r 2b5341fc4555 -r d6855f9d7eae 7-Haskell/day1.hs --- a/7-Haskell/day1.hs Sat Jun 15 17:31:22 2019 +0100 +++ b/7-Haskell/day1.hs Sat Jun 15 20:51:08 2019 +0100 @@ -15,5 +15,6 @@ colours = ["red", "green", "blue"] map_colouring :: [(String, String, String, String, String)] -- This just brute-forces all tuples and applies the rules, BUT it works and it uses Haskell list comprehension + -- Although, maybe it won't brute-force ALL of them, because if al == mi then it might skip the rest map_colouring = [(al, mi, ga, tn, fl) | al <- colours, mi <- colours, ga <- colours, tn <- colours, fl <- colours, mi /= tn, mi /= al, al /= tn, al /= mi, al /= ga, al /= fl, ga /= fl, ga /= tn] \ No newline at end of file