3 ms·
auto alist = [1, 3, 2]; alist .sort .map!(x => x * x) .map!(x => x - x/2) .map!(x => x + 1); This seems like what you're asking. Each of those is a te
by he_the_great 4y ago
auto alist = [1, 3, 2];
alist
.sort
.map!(x => x * x)
.map!(x => x - x/2)
.map!(x => x + 1);
This seems like what you're asking. Each of those is a template. And while this is all logic code, D has inferred the type aka: SortedRange!Map!Map!Map
With some details removed.