Beispiel #1
0
        public static Object apply(Symbol fn, Object[] args)
        {
            Object  cd = Precompiler.symbols[fn];
            MakeApp ap = new MakeApp(cd, args);

            return(ap.run(null, null));
        }
Beispiel #2
0
        public Object run(Object[] frame, Object[] envframe)
        {
            try
            {
                return(ca.run(frame, envframe));
            }
            catch (Exception ex)
            {
                Type oe = (Type)cex.run(frame, envframe);

                if (oe.IsAssignableFrom(ex.GetType()))
                {
                    MakeApp ap = new MakeApp(cthen, new Object[] { ex });
                    return(ap.run(frame, envframe));
                }
                // otherwise:
                throw ex;
            }
        }
Beispiel #3
0
        public static SimpleCode wrap(Object o, int n)
        {
            MakeApp ap = new MakeApp(o, new Object[n]);

            return(new SimpleCode(ap.run2));
        }
Beispiel #4
0
        static Object int_apply(Object[] f)
        {
            MakeApp ap = new MakeApp(f[0], (Object[])(f[1]));

            return(ap.run(null, null));
        }
Beispiel #5
0
        public static Object Apply(Object f, Object[] args)
        {
            MakeApp ap = new MakeApp(f, args);

            return(ap.run(null, null));
        }