Skip to content

Instantly share code, notes, and snippets.

@run-dlang
Created October 4, 2023 21:27
Show Gist options
  • Save run-dlang/d4c6c0316ea5b919c1a744a428e3d0f8 to your computer and use it in GitHub Desktop.
Save run-dlang/d4c6c0316ea5b919c1a744a428e3d0f8 to your computer and use it in GitHub Desktop.
Code shared from run.dlang.io.
import std;
void main()
{
string[] f(string s)
{
return s.map!(_ => [_,'-'].to!string).array;
}
writeln(f("Hello")); // extected output: ["H-","e-","l-","l-","o-"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment