Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Does perl6 have a native linked-list data type?

by perl5ever (Pilgrim)
on Nov 17, 2010 at 20:26 UTC ( [id://872050]=note: print w/replies, xml ) Need Help??


in reply to Re: Does perl6 have a native linked-list data type?
in thread Does perl6 have a native linked-list data type?

Actually, perl is and has been my primary language and I've been using it since the early 90's.

The main difference between a cons cell and an array is that you can get the tail of a cons cell without creating a new data object. The only way to get the tail of an array (as an array) is to create a whole new array object.

This difference leads to vastly different algorithms. Cons cells lend themselves to recursive formulations while arrays favor iterative approaches.

  • Comment on Re^2: Does perl6 have a native linked-list data type?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 08:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found