-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sequence() #70
Labels
good first issue
Good for newcomers
Comments
Hey @elliotchance, are you sure in sequence of numbers between min and max inclusive?
I consider that's better thing, in most languages this one works in such way. |
Yes, you’re right. The upper bound should not be inclusive. |
elliotchance
pushed a commit
that referenced
this issue
May 8, 2019
Sequence generates all numbers in range or returns nil if params invalid There are 3 variations to generate: 1. [0, n). 2. [min, max). 3. [min, max) with step. If len(params) == 1 considered that will be returned slice between 0 and n, where n is the first param, [0, n). If len(params) == 2 considered that will be returned slice between min and max, where min is the first param, max is the second, [min, max). If len(params) > 2 considered that will be returned slice between min and max with step, where min is the first param, max is the second, step is the third one, [min, max) with step, others params will be ignored. Fixes #70
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generates a sequence of numbers between min and max inclusive:
There could also be an optional third argument for the step size:
The text was updated successfully, but these errors were encountered: