Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
16
Task/Singleton/Lasso/singleton-2.lasso
Normal file
16
Task/Singleton/Lasso/singleton-2.lasso
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// Define thread level singleton
|
||||
|
||||
define singleton => type {
|
||||
data public switch = 'x'
|
||||
public oncreate => var(.type)->isa(.type) ? var(.type) | var(.type) := self
|
||||
}
|
||||
|
||||
local(
|
||||
a = singleton,
|
||||
b = singleton,
|
||||
)
|
||||
|
||||
#a->switch = 'a'
|
||||
#b->switch = 'b'
|
||||
|
||||
#a->switch // b
|
||||
Loading…
Add table
Add a link
Reference in a new issue