mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
fix: #357
This commit is contained in:
parent
607ecc92b5
commit
fd21c1c633
2 changed files with 15 additions and 10 deletions
|
@ -1,3 +1,5 @@
|
|||
from _erg_control import then__
|
||||
|
||||
class Array(list):
|
||||
def dedup(self, same_bucket=None):
|
||||
if same_bucket is None:
|
||||
|
@ -19,3 +21,6 @@ class Array(list):
|
|||
return Array(list(filter(f, self))), Array(
|
||||
list(filter(lambda x: not f(x), self))
|
||||
)
|
||||
|
||||
def __mul__(self, n):
|
||||
return then__(list.__mul__(self, n), Array)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue