DeedleFake / wdte

WDTE is a simple, functional-ish, embedded scripting language.
https://deedlefake.github.io/wdte
MIT License
20 stars 0 forks source link

std/stream: range should take a function for step #200

Open DeedleFake opened 4 years ago

DeedleFake commented 4 years ago

Currently, range takes a start, end, and step, where the step is a number that is added to the current value to progress from the start to the end. It would be neat if you could give a function that returns the next value from the current, such that, for example, range 0 5 (+ 1) would do the same thing as range 0 5 1.