Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
41
Task/Set/Maple/set.maple
Normal file
41
Task/Set/Maple/set.maple
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
> S := { 2, 3, 5, 7, 11, Pi, "foo", { 2/3, 3/4, 4/5 } };
|
||||
S := {2, 3, 5, 7, 11, "foo", Pi, {2/3, 3/4, 4/5}}
|
||||
|
||||
> type( S, set );
|
||||
true
|
||||
|
||||
> Pi in S;
|
||||
Pi in {2, 3, 5, 7, 11, "foo", Pi, {2/3, 3/4, 4/5}}
|
||||
|
||||
> if Pi in S then print( yes ) else print( no ) end:
|
||||
yes
|
||||
|
||||
> member( Pi, S );
|
||||
true
|
||||
|
||||
> if 4 in S then print( yes ) else print( no ) end:
|
||||
no
|
||||
|
||||
> evalb( { 2/3, 3/4, 4/5 } in S );
|
||||
true
|
||||
|
||||
> { a, b, c } union { 1, 2, 3 };
|
||||
{1, 2, 3, a, b, c}
|
||||
|
||||
> { a, b, c } intersect { b, c, d };
|
||||
{b, c}
|
||||
|
||||
> { a, b, c } minus { b, c, d };
|
||||
{a}
|
||||
|
||||
> { a, b } subset { a, b, c };
|
||||
true
|
||||
|
||||
> { a, d } subset { a, b, c };
|
||||
false
|
||||
|
||||
> evalb( { 1, 2, 3 } = { 1, 2, 3 } );
|
||||
true
|
||||
|
||||
> evalb( { 1, 2, 3 } = { 1, 2, 4 } );
|
||||
false
|
||||
Loading…
Add table
Add a link
Reference in a new issue