I have a domain I'd like to output with commas. In Python I can use the string
.join()
method, being fed by a list
.sort()
-ed product, but in Chapel I am not getting the right results.
var names = { "anze kopitar",
"tyler toffoli",
"drew doughty",
"jeff carter",
"tanner pearson"
};
writeln( names );
writeln( names.sorted() );
writeln( ",".join( names ) );
writeln( ",".join( names.sorted() ) );
I'd like the last line to read
anze kopitar,drew doughty,jeff carter,tanner pearson,tyler toffoli