Esempio n. 1
0
            private Expression GenList(ListExpr elem)
            {
                Contract.Requires <ArgumentNullException>(elem != null);
                Contract.Ensures(Contract.Result <Expression>() != null);
                Expression tail  = Expression.Constant(ListCell.Null);
                var        elems = elem.Elements;

                foreach (var item in elem.Elements.Reverse())
                {
                    tail = Cons(GenElemCore(item), tail);
                }
                return(tail);
            }
Esempio n. 2
0
 private Expression GenList(ListExpr elem)
 {
     Contract.Requires<ArgumentNullException>(elem != null);
     Contract.Ensures(Contract.Result<Expression>() != null);
     Expression tail = Expression.Constant(ListCell.Null);
     var elems = elem.Elements;
     foreach (var item in elem.Elements.Reverse()) {
         tail = Cons(GenElemCore(item), tail);
     }
     return tail;
 }