diff --git a/core/src/main/java/me/fourteendoggo/mathexpressionparser/function/FunctionContext.java b/core/src/main/java/me/fourteendoggo/mathexpressionparser/function/FunctionContext.java index c7e3779..1971e6f 100644 --- a/core/src/main/java/me/fourteendoggo/mathexpressionparser/function/FunctionContext.java +++ b/core/src/main/java/me/fourteendoggo/mathexpressionparser/function/FunctionContext.java @@ -5,6 +5,7 @@ import me.fourteendoggo.mathexpressionparser.utils.Utility; import java.util.Arrays; +import java.util.stream.DoubleStream; // FIXME: implement PrimitiveIterator.OfDouble maybe? /** @@ -149,6 +150,10 @@ public double getDouble(int idx) { return parameters[idx]; } + public DoubleStream toStream() { + return DoubleStream.of(parameters); + } + @Override public String toString() { StringBuilder sb = new StringBuilder("[");