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
24
Task/Symmetric-difference/Lasso/symmetric-difference.lasso
Normal file
24
Task/Symmetric-difference/Lasso/symmetric-difference.lasso
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[
|
||||
var(
|
||||
'a' = array(
|
||||
'John'
|
||||
,'Bob'
|
||||
,'Mary'
|
||||
,'Serena'
|
||||
)
|
||||
|
||||
,'b' = array
|
||||
|
||||
);
|
||||
|
||||
$b->insert( 'Jim' ); // Alternate method of populating array
|
||||
$b->insert( 'Mary' );
|
||||
$b->insert( 'John' );
|
||||
$b->insert( 'Bob' );
|
||||
|
||||
$a->sort( true ); // arrays must be sorted (true = ascending) for difference to work
|
||||
$b->sort( true );
|
||||
|
||||
$a->difference( $b )->union( $b->difference( $a ) );
|
||||
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue