-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
custom-set: Stub, order of methods, rename some methods (#286)
- Loading branch information
Showing
3 changed files
with
179 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package CustomSet; | ||
use strict; | ||
use warnings; | ||
|
||
# Replace `...` with a correct implementation. | ||
# https://perldoc.pl/perlsyn#The-Ellipsis-Statement | ||
|
||
sub new { | ||
my ($class, @members) = @_; | ||
...; | ||
} | ||
|
||
sub add { | ||
my ($self, $member) = @_; | ||
...; | ||
} | ||
|
||
sub remove { | ||
my ($self, $member) = @_; | ||
...; | ||
} | ||
|
||
sub is_empty { | ||
my ($self) = @_; | ||
...; | ||
} | ||
|
||
sub is_member { | ||
my ($self, $member) = @_; | ||
...; | ||
} | ||
|
||
sub size { | ||
my ($self) = @_; | ||
...; | ||
} | ||
|
||
sub to_list { | ||
my ($self) = @_; | ||
...; | ||
} | ||
|
||
sub union { | ||
my ($self, $other) = @_; | ||
...; | ||
} | ||
|
||
sub intersect { | ||
my ($self, $other) = @_; | ||
...; | ||
} | ||
|
||
sub difference { | ||
my ($self, $other) = @_; | ||
...; | ||
} | ||
|
||
sub is_disjoint { | ||
my ($self, $other) = @_; | ||
...; | ||
} | ||
|
||
sub is_subset { | ||
my ($self, $other) = @_; | ||
...; | ||
} | ||
|
||
sub is_equal { | ||
my ($self, $other) = @_; | ||
...; | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters