Nested function: Difference between revisions
m
→{{header|Ecstasy}}
m (→{{header|D}}) |
|||
Line 531:
=={{header|Ecstasy}}==
<syntaxhighlight lang="java">
module NestedFunction {
static String makeList(String separator) {▼
▲ static String makeList(String separator)
Int counter = 1;
Line 542 ⟶ 540:
+ makeItem("second")
+ makeItem("third");
void run() {
@Inject Console console;
console.print(makeList(". "));
}
}
</syntaxhighlight>
|