Closed
Description
What makes using arrays for the underlying cons
representation worth the O(n)
tradeoff?
I would kind of expected it too look more like the traditional cons
:
var nil = function () {};
var cons = function (car) {
return function (cdr) {
return {
car: car,
cdr: cdr
};
};
};
Where you might instantiate a new list like:
cons(35)(cons(42)(nil))
I'm really liking purescript so far.
Peace.
Metadata
Metadata
Assignees
Labels
No labels