1. Luke Plant
  2. phone2word

Commits

Luke Plant  committed 43179f6 Merge

Merged from default

  • Participants
  • Parent commits 910945a, 4012e7d
  • Branches simple-wordtree

Comments (0)

Files changed (1)

File phone2word.hs

View file
 
 Note, in finding all routes across the river, we must never use more than one
 'digit log' consecutively.  This restriction is needed because the algorithm for
-adding 'digit logs' can mean we get digit logs that can be laid end to end.
+adding 'digit logs' can mean we get digit logs that can be laid end to end, and
+that case should always be ignored, since it is the same as having one larger
+digit log.
 
 -}
 
      findRoutes' :: WordMap -> Int -> Int -> [Combo]
      findRoutes' wordMap start end =
          do
-           -- find words that start as position 'start':
+           -- find words that start at position 'start':
            ((p,len),ws) <- filter (\((p,_),_) -> p == start) wordMap
            w <- ws
            if p + len == end