range's behavior is inconsistent

Description

Problem statement: The current behavior of range is inconsistent. (range 0 9 0) has always produced (). (range 0 9 -1) has always produced (). (range 9 0 1) has always produced (). However, (range 9 0 0) produces (9 9 9 9 ...), and (range 0 0 0) produces '(0 0 0 0 ...)

Proposal: Make the behavior of range consistent when using a step of 0 to make it produce an empty list.

Please see attached code and patch.

Environment

None

Attachments

1

Activity

Devin Walters 
December 10, 2012 at 9:53 PM

@Tim: I've removed the other attachments.

@Rich: Understood. I will update the description this evening.

Rich Hickey 
December 9, 2012 at 12:44 PM

As someone who has to read these tickets, I'd really appreciate it if you could keep the description up to date and accurate, with examples of the current and intended behavior and the strategy to be used in fixing. I can't follow every thread to see what the latest thinking is, especially on a patch like this where the original mission was changed.

Thanks

Timothy Baldridge 
November 27, 2012 at 9:06 PM

For some reason I'm not allowed to edit the attachments list. When you apply the patch, please apply inconsistent_range_fix.diff as that is the most recent version of the fix.

Timothy Baldridge 
November 27, 2012 at 9:04 PM

Patch applies cleanly. We've discussed this issue to death (for as simple as it is). I think it's time to mark it as screened.

Timothy Baldridge 
November 27, 2012 at 9:01 PM

Marking as vetted

Completed

Details

Assignee

Reporter

Labels

Approval

Patch

Priority

Created June 29, 2012 at 10:25 PM
Updated May 24, 2013 at 1:34 PM
Resolved May 24, 2013 at 1:34 PM