||
|| so help me, this is a correct and complete solution!
|| Thanks to Tony Field.
||
blacks, whites :: [*] -> [*] -> num
  blacks code guess = #(filter id (map2 (=) code guess))
  whites code guess = #code - blacks code guess - #(code--guess)
