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