ref: 7f3da47a8e1a1e6c6f9d63946ad84ed589310a17 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