Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Set/Ceylon/set.ceylon
Normal file
18
Task/Set/Ceylon/set.ceylon
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
shared void run() {
|
||||
value a = set {1, 2, 3};
|
||||
value b = set {3, 4, 5};
|
||||
value union = a | b;
|
||||
value intersection = a & b;
|
||||
value difference = a ~ b;
|
||||
value subset = a.subset(b);
|
||||
value equality = a == b;
|
||||
|
||||
print("set a: ``a``
|
||||
set b: ``b``
|
||||
1 in a? ``1 in a``
|
||||
a | b: ``union``
|
||||
a & b: ``intersection``
|
||||
a ~ b: ``difference``
|
||||
a subset of b? ``subset``
|
||||
a == b? ``equality``");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue