Open ricardoboss opened 11 months ago
A range function to return a list of numbers starting from start and count up to end using step steps between numbers.
range
start
end
step
Example usage:
list digits = range(0, 9, 1) // 1 could be the default for step println(digits) // [0, 1, 3, 4, 5, 6, 7, 8, 9] list fractions = range(0, 1, 0.1) println(fractions) // [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]
start and end should be inclusive, although that is debatable.
The function should be created in the StepLang.Framework.Pure namespace. If you need any more guidance, I will try to help :)
StepLang.Framework.Pure
@denizkirbiyik
A
range
function to return a list of numbers starting fromstart
and count up toend
usingstep
steps between numbers.Example usage:
start
andend
should be inclusive, although that is debatable.