public static void SetCall(this GraphBuilder builder, Primitive ofTheCall, params int[] argumentsThenResult)
        {
            var types = argumentsThenResult.Select(s => (IState)ofTheCall).ToArray();

            builder.SetCall(types, argumentsThenResult);
        }
        public static void SetReverse(this GraphBuilder graph, int arrId, int resultId)
        {
            var t = graph.InitializeVarNode();

            graph.SetCall(new[] { Array.Of(t), Array.Of(t) }, new[] { arrId, resultId });
        }
 public static void SetBoolCall(this GraphBuilder builder, int leftId, int rightId, int resultId)
 {
     builder.SetCall(
         argThenReturnTypes: new IState[] { Primitive.Bool, Primitive.Bool, Primitive.Bool },
         argThenReturnIds: new[] { leftId, rightId, resultId });
 }
        public static void SetSumCall(this GraphBuilder builder, int argId, int resultId)
        {
            var varNode = builder.InitializeVarNode(Primitive.U24, Primitive.Real);

            builder.SetCall(new IState[] { Array.Of(varNode), varNode }, new [] { argId, resultId });
        }