summaryrefslogtreecommitdiffstats
path: root/formatDictionary.hs
diff options
context:
space:
mode:
authorRaymond E. Hogenson <rayhogenson@gmail.com>2015-09-29 14:15:32 -0800
committerRaymond E. Hogenson <rayhogenson@gmail.com>2015-09-29 14:15:32 -0800
commit75a90aa9442e75845843e9ad9a06178ed003d357 (patch)
tree6bf2d7d168b6967d45e220e136bc7cdfe31adf55 /formatDictionary.hs
downloadcircle-words-75a90aa9442e75845843e9ad9a06178ed003d357.tar.zst
Add the existing filesHEADmain
This is a program that takes a list of words, then finds which phrases when read in a circle shape contain only english words when split in a certain way.
Diffstat (limited to 'formatDictionary.hs')
-rwxr-xr-xformatDictionary.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/formatDictionary.hs b/formatDictionary.hs
new file mode 100755
index 0000000..77e7d7c
--- /dev/null
+++ b/formatDictionary.hs
@@ -0,0 +1,7 @@
+import Data.List
+import Data.Char
+import qualified Data.Set as Set
+import System.Environment
+main = do dict <- getContents
+ let formattedDict = Set.toList . Set.fromList $ "a":"i":[map toLower words | words <- lines dict, length words > 1]
+ putStr (unlines formattedDict)