Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^3: [Raku] Ranges in array slices

by holli (Abbot)
on Jun 05, 2021 at 19:14 UTC ( #11133562=note: print w/replies, xml ) Need Help??

in reply to Re^2: [Raku] Ranges in array slices
in thread [Raku] Ranges in array slices

Functionally you can express all Ranges as Sequences, albeit that'd be slower methinks. What you're asking is a bit like asking why we need multiplication if we can just keep adding.

Check out the documentation. Range, just like List does Positional and Iterable roles. Seq only does Iterable and implements the indexing (AT-POS method et. al) itself, specifically a Seq always has to calculate all n-1 elements before you can access the n-th element.


You can lead your users to water, but alas, you cannot drown them.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11133562]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (1)
As of 2021-09-19 03:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found