Add $times and $values to lambda blocks
Is your feature request related to a problem? Please describe. I'm looking for building some finance indicators using pipeline functions.
When using lambdas I see the only predefined variables are the actual $time and $value. It would be great to have access to the series and previous elements somehow.
Describe the solution you'd like
For example, if I'd build some moving averages, I could use like $values[-1] to get the previous element or a range like $values[-1..-5] to get a range of the last 5 elements. Not sure about the range syntax but that is the idea.
I also see a great value to have access to the actual $index of the element in the collection during the iteration.
Describe alternatives you've considered I'm not sure maybe it can be done with some other pipeline functions, still learning here.