http://www.perlmonks.org?node_id=872050


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.