Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
15
Task/Singleton/Ecstasy/singleton.ecstasy
Normal file
15
Task/Singleton/Ecstasy/singleton.ecstasy
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
module test {
|
||||
static service Singleton {
|
||||
private Int counter;
|
||||
String fooHasBeenCalled() {
|
||||
return $"{++counter} times";
|
||||
}
|
||||
}
|
||||
|
||||
void run() {
|
||||
@Inject Console console;
|
||||
for (Int i : 1..5) {
|
||||
console.print($"{Singleton.fooHasBeenCalled()=}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue