in reply to Re: Does perl6 have a native linked-list data type?
in thread Does perl6 have a native linked-list data type?
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.
|
|---|