The memory element has a capacity() and a len() method (I think memory.len() might be the appropriate equivalent to self.capacity), why is it necessary to have another struct element capacity in the struct Buffer? This seems like duplicate book-keeping to me, why is that necessary?
see also: example of reduction
The
memoryelement has acapacity()and alen()method (I thinkmemory.len()might be the appropriate equivalent toself.capacity), why is it necessary to have another struct elementcapacityin thestruct Buffer? This seems like duplicate book-keeping to me, why is that necessary?see also: example of reduction