Re: [q-lang-users] Vector module
Brought to you by:
agraef
From: John C. <co...@cc...> - 2007-10-02 18:51:03
|
Albert Graef scripsit: > All right, I have this implemented for reference tuples, lists and > streams now. You can find the source here: > http://q-lang.cvs.sourceforge.net/q-lang/q/stdlib/reftypes.q?view=log (:=) is a good feature, but has really nothing to do with this, and should be in some generic place like stdlib (or in clib itself). Using lists to implement put and putmap for tuples is not really good, because the whole idea of mutable vectors is to avoid copying them -- that is, to update them in various ways using only O(1) space. Mapping to lists and back requires O(n) space. I'd suggest adding "dotuple", "dotuplewith", "dotuplewith3" to stdlib.q and using them for tuple operations. -- John Cowan co...@cc... http://ccil.org/~cowan This great college [Trinity], of this ancient university [Cambridge], has seen some strange sights. It has seen Wordsworth drunk and Porson sober. And here am I, a better poet than Porson, and a better scholar than Wordsworth, somewhere betwixt and between. --A.E. Housman |