This function produces essentially the same output as map(Module,Module,Function), except that the output map belongs to the class LabeledModuleMap, and thus remembers the labeled module structure of the source and target.
i1 : S=QQ[x,y,z];
i2 : F=labeledModule(S^3)
3
o2 = S
o2 : free S-module with labeled basis
i3 : f=map(F,F,(i,j)->(S_i)^j)
o3 = | 1 x x2 |
| 1 y y2 |
| 1 z z2 |
3 3
o3 : Matrix S <--- S