mirror of
https://github.com/erg-lang/erg.git
synced 2025-07-14 00:25:17 +00:00
15 lines
262 B
Python
15 lines
262 B
Python
.Set!: ClassType
|
|
.Set!.
|
|
'''erg
|
|
s = !{}
|
|
s2 = s.copy()
|
|
s.add!(1)
|
|
assert s2 == {}
|
|
'''
|
|
copy: (self: Ref Set!) -> Set!
|
|
'''erg
|
|
s = !{}
|
|
s.add!(1)
|
|
assert s == {1}
|
|
'''
|
|
add!: |T|(self: RefMut(Set!(T)), x: T) => NoneType
|