use some haskell idioms

``all id (map (\i -> (b !! i) == t) xs)``
to
``and (map (\i -> (b !! i) == t) xs)``


``splitEvery 3 $ ``
to
``chunksOf 3 $ ``


`` foldl (\acc t -> Empty : acc) [] [1..9]``
to
``replicate 9 Empty``