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