// ReSharper disable ParameterTypeCanBeEnumerable.Local private static Compiled.Goal [] Compile (AST.Goal [] goals, IDictionary <Tuple <string, int>, Compiled.Predicate> predicatesByName) // ReSharper restore ParameterTypeCanBeEnumerable.Local { return goals.Select (g => new Compiled.Goal {Predicate = predicatesByName[Tuple.Create (g.PredicateName, g.Arguments.Length)], Arguments = g.Arguments}).ToArray (); }