ref: 6ee5b5e8428ca78ea1d5a675fb34ccc5b36ef680 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