Exemple #1
0
        static object Sum(List <Expression> p)
        {
            var tally = new Tally();

            foreach (Expression e in p)
            {
                tally.Add(e);
            }
            return(tally.Sum());
        }
Exemple #2
0
        // 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);
        }
Exemple #3
0
 // 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;
 }