Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/Nested-function/D/nested-function.d
Normal file
15
Task/Nested-function/D/nested-function.d
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
string makeList(string seperator) {
|
||||
int counter = 1;
|
||||
|
||||
string makeItem(string item) {
|
||||
import std.conv : to;
|
||||
return to!string(counter++) ~ seperator ~ item ~ "\n";
|
||||
}
|
||||
|
||||
return makeItem("first") ~ makeItem("second") ~ makeItem("third");
|
||||
}
|
||||
|
||||
void main() {
|
||||
import std.stdio : writeln;
|
||||
writeln(makeList(". "));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue