Stream analysis using functional techniques.