On Friday, 26 December 2014 at 16:31:48 UTC, Nordlöw wrote:
On Friday, 26 December 2014 at 16:29:56 UTC, Nordlöw wrote:
See my update at
https://github.com/nordlow/justd/blob/master/algorithm_ex.d#L1602
which tries to merge all the ideas into one adapting algorithm
:)
Destroy!
BTW:
writeln(estimateLength([1,2,3],[1,2,3]));
If appending to an int[] this must print 6, if appending to an
int[][] it should
print 2.
1. Is is relevant to extend `append` to data being a
non-Random-Access range?
Currently it does not work for RA ranges, only for arrays. RA
ranges cannot grow and std.container.Array is no RA range.
2. I guess a corresponding `prepend` is motivated aswell, right?
Maybe not, since you cannot efficiently prepend to an array, so
having users call bringToFront explicitly might be more inline
with how e.g. std.container handles complexities.