This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo: required #is required to use docker service in travis | |
language: php #can be any language, just php for example | |
services: | |
- docker # required, but travis uses older version of docker :( | |
install: | |
- echo "install nothing!" # put your normal pre-testing installs here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Could use a few rounds of cleanup... | |
import Data.Char | |
import Data.List | |
dictionary :: [String] | |
dictionary = [[chr c] | c <- [0 .. 127]] | |
prefixes :: [String] -> String -> [(Int, String)] | |
prefixes xs y = [(i, xs !! i) | i <- [0 .. (length xs) -1], xs !! i `isPrefixOf` y] |