Skip to content

Fix inconsistent behavior of range function #30

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

Merged
merged 1 commit into from
Jun 14, 2015
Merged

Fix inconsistent behavior of range function #30

merged 1 commit into from
Jun 14, 2015

Conversation

sharkdp
Copy link
Contributor

@sharkdp sharkdp commented Jun 14, 2015

The following behavior of the range function seems inconsistent to me (it is inconsistent with Data.Array.range)

0 .. 2 == 0 : 1 : 2 : Nil
0 .. 1 == 0 : 1 : Nil
0 .. 0 == Nil -- would expect this to be 0 : Nil

The appended fix modifies the behavior of range to return singleton 0 in the last case.

@garyb
Copy link
Member

garyb commented Jun 14, 2015

👍 thanks!

garyb added a commit that referenced this pull request Jun 14, 2015
Fix inconsistent behavior of range function
@garyb garyb merged commit 7339099 into purescript:master Jun 14, 2015
@sharkdp sharkdp deleted the fix-range branch June 14, 2015 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants