mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-27 19:59:07 +00:00
13 lines
671 B
Python
13 lines
671 B
Python
.Container = Trait { .__contains__ = (self: Self) -> Bool }
|
|
.Hashable = Trait { .__hash__ = (self: Self) -> Nat }
|
|
.Sized = Trait { .__len__ = (self: Self) -> Nat }
|
|
# TODO: varargs
|
|
.Callable = Trait { .__call__ = (self: Self) -> Obj }
|
|
# .Iterator T = Trait { .__next__ = (self: Self) -> T }
|
|
.Iterator = Trait { .__next__ = (self: Self) -> Obj }
|
|
# .Iterable T = Trait { .__iter__ = (self: Self) -> Iterator T }
|
|
.Iterable = Trait { .__iter__ = (self: Self) -> .Iterator }
|
|
.Collection = Subsume .Container and .Iterable
|
|
.Reversible = Trait { .__reversed__ = (self: Self) -> .Iterator }
|
|
.Genertor = Subsume .Iterator
|
|
.Sequence = Subsume .Collection and .Sized and .Reversible
|