ref: 30bbf972cec6f7ed080b42d6ccead04e110f8b98 dir: /Tools/Count.hs/
import System.Environment import Data.List main = do [pat, fn] <- getArgs file <- readFile fn let n = length $ filter (isPrefixOf pat) (tails file) print n