Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Singleton/Latitude/singleton.latitude
Normal file
13
Task/Singleton/Latitude/singleton.latitude
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Singleton ::= Object clone tap {
|
||||
self id := 0.
|
||||
self newID := {
|
||||
self id := self id + 1.
|
||||
}.
|
||||
self clone := {
|
||||
err ArgError clone tap { self message := "Singleton object!". } throw.
|
||||
}.
|
||||
}.
|
||||
|
||||
println: Singleton newID. ; 1
|
||||
println: Singleton newID. ; 2
|
||||
println: Singleton newID. ; 3
|
||||
Loading…
Add table
Add a link
Reference in a new issue