[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Proposed new SRFI for immutable lists



Kevin Wortman scripsit:

> Should these procedures take SRFI 114 comparators instead of equality
> predicates?

I thought about it, but only the equality predicate is actually useful,
and only for a few operations.  To extract the equality predicate from
a comparator, use comparator-equality-predicate (binary) or make-=? (N-ary).

> Are cycles actually possible in strict immutable structures? When you
> create a head node, there's no way for it to have a circular link to a tail
> node that doesn't exist yet.

They aren't, unless they are constructed under the table.  See CyclesMedernach
for a preliminary proposal.

> Personally I am fond of first, second, etc.; I think they are more readable
> than car, cadr, etc.

Okay, easy to add.

> The immutable set data structures I have in mind do set-theoretic
> operations in O(n) time, though constructing them from an unordered list is
> O(n log n).

Fair enough.

> I would ditch xipair and factor out parameter rotation to a "flip"
> procedure, probably in a separate library or SRFI, as defined in Chicken (
> http://wiki.call-cc.org/man/4/Unit%20data-structures#combinators ).

I plan such a library anyway, but I want to make this SRFI as much as
possible a drop-in replacement.

-- 
John Cowan          http://www.ccil.org/~cowan        cowan@x
You cannot enter here.  Go back to the abyss prepared for you!  Go back!
Fall into the nothingness that awaits you and your Master.  Go! --Gandalf

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports