Hey everyone, I'm trying to implement a "slice" function but I'm not sure how to go with negative steps

Let's say we have (slice start end [step])
And
(slice alphabet 0 10) returns abcdefghij

What should this
(slice alphabet 0 10 -1) return?
FWIW, #Python returns nothing for alphabet[0:14:-1]

#pldev #ArkScript

jihgfedcba (reversed selection)
71.4%
zyxwvutsrq (reversed but start at the end)
0%
Other
28.6%
Poll ended at .
IMO, reversing the selection is more logical, you read 0, 10: you know it will select from 0 to 10, then the step is -1 instead of 1, so it goes from the end of the selection to its beginning?

@lexplt Does your function allow start > end? I think that makes a difference.

Incidentally, if it doesn't, I wonder if "min" and "max" (or "lower" and "upper" or something) wouldn't be better names than "start" and "end"? I mean, I think I would find it quite unintuitive if the first element that comes out of the iterator is not "start", but changing names could help that seem less weird.

@diazona it doesn’t allow start > end for now, because I find that confusing / harder to grasp what’s going on
@lexplt Hmm, I see. Well, in that case I suppose it does make sense for (slice alphabet 0 10 -1) to return jihgfedcba because it sounds like there's no other combination of parameters that would produce that output, I just have a feeling a lot of developers would find that unintuitive. Partly because, as I said, it seems natural (to me and, I'm guessing, a lot of others) that the first element out should be at the start index; but even setting that aside, there's the confusion surrounding whether the end bound should remain exclusive even if that's where the iteration starts. The behavior I'm used to in pretty much every other slice-like iterator I've worked with is that it begins with an inclusive bound and finishes with an exclusive one (like rbegin() and rend() in C++ collections), and deviating from that feels even more out-of-place to me than having the result not start with the start element.
@lexplt For what it's worth, your example says "abcdefij", which confused me terribly. Shouldn't it be "abcdefghij" for the first ten letters?
@Two9A woops yes, it’s a typo on my part
@lexplt I think Python is correct: if start < end and step < 0, nothing should be returned.

@peterdrake in my mind start should always be less than end, and the step is how we iterate / select elements in the range provided, so 0-10 selects a to j, and -1 means go backward

I think your point is also valid! This is a tricky question, and so far I’ve only seen different answers and explanations to this, no one seems to agree but everyone is also right, given their logic

@lexplt How about doing this in two steps?

alphabet[0:14][::-1]

@peterdrake yeah I’m basically doing those two things at the same time
Maybe I need to brush up my python slices skills to understand exactly what they do