Ejemplo n.º 1
0
        public static Operative Vau(Environment env, Object formals, Object eformal, List expr)
        {
            if ((formals is Symbol && formals == eformal) ||
                (formals is Pair p && eformal is Symbol && p.Contains(eformal)))
            {
                throw new ArgumentException("Formals contain eformal");
            }

            return(new Operative(env,
                                 Applicatives.CopyEvaluationStructureImmutable(formals),
                                 eformal,
                                 expr.Select <Object>(Applicatives.CopyEvaluationStructureImmutable)));
        }
Ejemplo n.º 2
0
 public static Applicative Lambda(Environment env, Object formals, List exprs)
 => Applicatives.Wrap(Vau(env, formals, Ignore.Instance, exprs));
Ejemplo n.º 3
0
 public static Object LetSafe(Environment environment, List bindings, List body)
 => LetRedirect(environment, Applicatives.StandartEnvironment(), bindings, body);