Skip to content
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

Range(start, count) behavior not corresponding with docs #282

Closed
ospiper opened this issue Jan 24, 2021 · 1 comment
Closed

Range(start, count) behavior not corresponding with docs #282

ospiper opened this issue Jan 24, 2021 · 1 comment
Assignees
Labels
validated bug Bug validated by the RxGo team.

Comments

@ospiper
Copy link

ospiper commented Jan 24, 2021

Describe the bug
According to the image of docs here, the second argument indicates length of the iterator (i.e. start ... (start+count-1)), but in code here the actual range gets to be start ... (start+count) which is not expected from the documentations.

To Reproduce

for i := range rxgo.Range(0, 3).Observe() {
	fmt.Println(i.V.(int))
}

outputs:

0
1
2
3

Expected behavior

0
1
2
@ospiper ospiper added the validated bug Bug validated by the RxGo team. label Jan 24, 2021
@maguro
Copy link
Contributor

maguro commented Mar 22, 2021

PR filed #288.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validated bug Bug validated by the RxGo team.
Projects
None yet
Development

No branches or pull requests

3 participants