September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -0,0 +1,22 @@
import Data.List (delete)
import Data.Char (toUpper)
-- Any block sequences found
spellWith :: [String] -> String -> [[String]]
spellWith _ [] = [[]]
spellWith blocks (x:xs) =
foldMap
(\b ->
if x `elem` b
then foldMap (return . (b :)) (spellWith (delete b blocks) xs)
else [])
blocks
blocks :: [String]
blocks = words "BO XK DQ CP NA GT RE TG QD FS JW HU VI AN OB ER FS LY PC ZM"
main :: IO ()
main =
mapM_
(print . ((,) <*>) (not . null . spellWith blocks . (toUpper <$>)))
["", "A", "BARK", "BoOK", "TrEAT", "COmMoN", "SQUAD", "conFUsE"]