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