That would be cool. I think 'b would have to be a new datatype. One that stored its own index and length and imposed its head and tail on the series.
But what happens when elements are removed from 'a that are also in 'b ? Should the length of 'b be reduced? Rebol would have to keep track of all the shares and update them when the original series is modified. This would slow rebol down a fair bit, I reckon. Otherwise, the length of 'b wouldn't be updated and you could get the situation where the length of 'b is greater than the number of elements that 'b shows! But that might just be a totally acceptable situation too! Maybe the user could be in charge of updating the length of the share when it seems appropriate. Anton. > Hello All, > > I'm not sure if there is some workaround for this but maybe it would be > handy to have native 'share feature in the next version? > > >> a: [1 2 3 4 5 6 7 8] > == [1 2 3 4 5 6 7 8] > >> b: share 'a 3 6 > == [3 4 5 6] > >> head b > == [3 4 5 6] > >> last b > == 6 > >> length? b > == 4 > >> b/3: 10 > == [3 4 10 6] > >> probe a > == [1 2 3 4 10 6 7 8] > > BTW Anyone know how to make 'share as a mezzanine function? ;-) > > regards, > > Cyphre -- To unsubscribe from this list, please send an email to [EMAIL PROTECTED] with "unsubscribe" in the subject, without the quotes.
