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