Commits

Luke Plant  committed e9851e5

Simplifications.

  • Participants
  • Parent commits 7e6fece

Comments (0)

Files changed (1)

File phone2word.hs

 
       - in doing the above, ensure that duplicate digit words are not added.
       -}
-         let wordPos = getWordPositions wordMap
+         let wordPos = nub $ map fst $ wordMap
              endPositions = 0 : findEndPositions wordPos
          in (++) wordMap $ nub $ do
            pos <- endPositions
 
      totalLength = B.length digits
 
-     -- get a list of all (position,length) which have words
-     getWordPositions :: WordMap -> [(Int,Int)]
-     getWordPositions wordMap = nub $ map fst $ wordMap
-
 --
 -- Main
 --