This has nothing to do with the tuples, I think.
test2.d:
import std.algorithm;
void main() {
map!((int x){return x+1;})([1,2,3,4,5]);
}
pp ~/dee% rdmd test2.d
test2.d(4): Error: delegate std.algorithm.__dgliteral1 cannot access
frame of function __dgliteral1
test2.d(4): Error: template
The following code fails to compile:
double sim(Document doc, string query)
{
alias Tuple!(double, "wij", double, "wiq") Weights;
Document q = Document.fromString(query);
Weights[] wi;
foreach (s; StrFilt(query))
wi ~= Weights(doc.termFreq(s) * i