Skip to content

Instantly share code, notes, and snippets.

@toomasv
Last active February 22, 2022 07:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toomasv/f0158fd4e9c32d4e20944439dd54b576 to your computer and use it in GitHub Desktop.
Save toomasv/f0158fd4e9c32d4e20944439dd54b576 to your computer and use it in GitHub Desktop.
Like `range`, but op!
Red [
Author: "Toomas Vooglaid"
Date: 2018-12-11
Improvements: @9214
]
thru: make op! func [a b /local inc op cmp][
inc: pick [1% 1] percent? a
set [op cmp] reduce pick [[:+ :<][:- :>]] a < b
collect [until [keep a b cmp a: a op inc]]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment