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

Re: Awaken, discussion!



A couple comments.

For vector-copy! Guile provides vector-move-left! and
vector-move-right!, so that you can safely copy a vector onto itself
(useful for implementing -insert/-delete).  You don't really need the
-left!/-right! distinction, so long as you check the TSTART vs. FSTART
(if TSTART is smaller you copy left->right, if FSTART is smaller you
copy right->left).  So the API can remain the same but it's probably
worth requiring in the SRFI that TARGET and VEC are allowed to be the
same vector.

For the CMP of vector-binary-search, is there a consensus on returning
symbols?  You could pass a < predicate which is consistent with the sort
SRFI and allows use of built-ins like string-ci<?, or use a comparator
with a positive/negative/zero as in C which allows the use of the
built-in - procedure.

-- 
Alex