[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Proposed new SRFI for immutable lists
- To: Kevin Wortman <kwortman@x>
- Subject: Re: [Scheme-reports] Proposed new SRFI for immutable lists
- From: John Cowan <cowan@x>
- Date: Wed, 3 Sep 2014 14:48:46 -0400
- Cc: Scheme Specification team <scheme-reports@x>
- In-reply-to: <CAD2CXes8JJOVE0LgQJgPOObV-WzDc9qY6oTOGE=tynb7BGtvrw@mail.gmail.com>
- References: <20140901025019.GF5424@mercury.ccil.org> <CAD2CXes8JJOVE0LgQJgPOObV-WzDc9qY6oTOGE=tynb7BGtvrw@mail.gmail.com>
Kevin Wortman scripsit:
> Should these procedures take SRFI 114 comparators instead of equality
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).
> 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