The scalar and integer quasar::Range(minVal, maxVal, step = 1) constructors in quasar_dsl.h build an incorrect range object: maxVal and step are swapped.
So Range(1, 5, 1) returns , and Range(1, 1, 5) returns [1 2 3 4 5], which is wrong.
The way these 3 parameters are interpreted corresponds to the Quasar syntax of minVal:step:maxVal, but not to the order of the arguments in the C++ Range constructor. (The order of course is different to leverage C++’s default argument mechanism for step, which needs to come last.)
I think step and maxVal need to be pushed in reverse order on the evaluation stack in quasar_dsl.h.
Indeed, there is a mistake in quasar_dsl.h. Thanks for pointing this out! The two constructors of Range() need to be modified to:
This corresponds to the minVal..step..maxVal notation of Quasar.