static object Sum(List <Expression> p) { var tally = new Tally(); foreach (Expression e in p) { tally.Add(e); } return(tally.Sum()); }
// utility for tallying statistics static Tally GetTally(List <Expression> p, bool numbersOnly) { var tally = new Tally(numbersOnly); foreach (Expression e in p) { tally.Add(e); } return(tally); }
// utility for tallying statistics static Tally GetTally(List<Expression> p, bool numbersOnly) { var tally = new Tally(numbersOnly); foreach (Expression e in p) { tally.Add(e); } return tally; }