ref: 8cfb829ca07f64a38eea051229e8d937f4ae3ed6 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