ref: 5e4f9f0a07f9f3dfc9616dabdc4b720a995ff48b 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