changeset 88:d6855f9d7eae

Add a note about exhaustive vs filtered brute-forcing
author IBBoard <dev@ibboard.co.uk>
date Sat, 15 Jun 2019 20:51:08 +0100
parents 2b5341fc4555
children 7e4afb129bef
files 7-Haskell/day1.hs
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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