Stream: beginners

Topic: List.range docs/behavior mismatch re: inclusion of last num


view this post on Zulip Andy Kluger (Nov 17 2022 at 18:58):

Hello!

I am a slow learner but am excited to learn roc. The docs for List.range say "Returns a list of all the integers between one and another, including both of the given numbers."

But in the roc repl, the second given number is not included in the resulting List. What's correct?

view this post on Zulip Brendan Hansknecht (Nov 17 2022 at 19:01):

Bug that has not been dealt with yet

view this post on Zulip Brendan Hansknecht (Nov 17 2022 at 19:02):

Two filed related issues #4169 and #4196

view this post on Zulip Andy Kluger (Nov 17 2022 at 19:02):

Ah, thanks!

view this post on Zulip Brendan Hansknecht (Nov 17 2022 at 19:02):

Ah, based on a comment on the second bug, currently it is always inclusive That PR was closed, not merged. We still need to update.

view this post on Zulip Brendan Hansknecht (Nov 17 2022 at 19:02):

Though we plan to update the api to something more expressive.

view this post on Zulip Andy Kluger (Nov 17 2022 at 19:09):

I did try searching zulip here for List.range, but didn't get to that existing discussion. Maybe I'm not zulip-ing properly.

view this post on Zulip Brendan Hansknecht (Nov 17 2022 at 19:12):

Are you in the #ideas stream? If not, I don't think you would see that discussion when searching.

view this post on Zulip Andy Kluger (Nov 17 2022 at 19:15):

I don't yet have a notion of being "in" a "stream"; I see the ideas stream on the left stream list, I clicked "All messages" at the top left, then the search magnifying glass at the top middle.

view this post on Zulip Brendan Hansknecht (Nov 17 2022 at 19:24):

If you see the ideas stream and the messages in it, you are "in" the stream. That should be all that is required for searching the stream.

Hmm. I am not sure what is happening with your search. If I click "All messages" then the search magnifying glass and search for list.range, I see many messages in the ideas stream after scrolling up.

view this post on Zulip Andy Kluger (Nov 17 2022 at 19:27):

Oh, I see, thanks. It defaulted to only searching my own history, but when I scrolled up (which I did not expect to be the direction of further results), this was explained, with a link to expand my search to all public channels. Thanks!


Last updated: Jul 06 2025 at 12:14 UTC