Permalink
Browse files

Just realized I should probably only use capital letters

  • Loading branch information...
1 parent 2621874 commit 91ca08c7617379de1fea7aa0792cb20aac15f267 @polymerwitch committed Feb 25, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 WordScore.hs
View
@@ -8,6 +8,7 @@ module WordScore where
import Data.List (sortBy)
import Data.Ord (comparing)
+import Char (toUpper)
scoreWord :: String -> String -> Integer
scoreWord [] ss = 0
@@ -19,3 +20,6 @@ listScore ss = map (\x -> (scoreWord x (concat ss)) - (scoreWord x x)) ss
rankWords :: [String] -> [String]
rankWords ss = reverse $ map snd $
sortBy (comparing fst) (zip (listScore ss) ss)
+
+allCaps :: [String] -> [String]
+allCaps = (map . map) toUpper

0 comments on commit 91ca08c

Please sign in to comment.