Esempio n. 1
0
        public override IScheminType Execute(Environment env, Evaluator eval, ScheminList args)
        {
            IScheminType function = args.Car();
            ScheminList argList = args.Cdr();
            ScheminList toApply = (ScheminList) args.Cdr().Last();

            ScheminList list = new ScheminList();
            list.UnQuote();

            foreach (IScheminType type in toApply)
            {
                list.Append(type);
            }

            foreach (IScheminType type in argList)
            {
                if (type != toApply)
                    list.Cons(type);
            }

            list.Cons(function);

            return list;
        }