I wasn't talking about recursion but composition. Can I write template A and then apply it to itself to get template B and then apply that onto template C to get template D.
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