ref: 971f758a8b3fdf0a663a00477d6b3fbd153518bc 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