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