-
Notifications
You must be signed in to change notification settings - Fork 7
Aggregate
It creates a new aggregate.
Precondition : it requires the name of the aggregate
Example : aggregate create fruits
Note : The created aggregate will be in the global scope. Under the hood it is an associative array.
It add an element to aggregate.
Precondition : it requires the name of the aggregate and the element.
Example : aggregate add fruits apple
Removes all elements from aggregate.
Precondition : it requires the name of the aggregate.
Example : aggregate erase fruits
Returns the number of elements in the aggregate.
Precondition : it requires the name of the aggregate.
Example : aggregate size fruits
Removes an element from the aggregate.
Precondition : it requires the name of the aggregate and the element.
Example : aggregate remove fruits apple
Returns the elements contained in the aggregate.
Precondition : it requires the name of the aggregate.
Example : aggregate elements fruits
Creates the union aggregate with elements from two input aggregates.
Precondition : it requires the name of the two input aggregates and the name of the output aggregate.
Example : aggregate contains fruits vegetables union_set
Creates the intersection aggregate with elements from two input aggregates.
Precondition : it requires the name of the two input aggregates and the name of the output aggregate.
Example : aggregate intersection fruits vegetables intersection_set
Creates the difference aggregate with elements from two input aggregates.
Precondition : it requires the name of the two input aggregates and the name of the output aggregate.
Example : aggregate difference fruits vegetables difference_set
Test whether the first aggregate equals with the second aggregate
Precondition : it requires the name of the two input aggregates.
Example : aggregate equal fruits vegetables
Test whether every element in first aggregate is in second aggregate
Precondition : it requires the name of the two input aggregates.
Example : aggregate difference fruits vegetables
Returns whether the aggregate is empty.
Precondition : it requires the name of the aggregate.
Example : aggregate empty fruits
It destroys the aggregate.
Precondition : it requires the name of the aggregate.
Example : aggregate destroy fruits