diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-19 12:53:47 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-19 12:53:47 +0000 |
| commit | 639c6ac65a1bd44b2ba0725fe7016a4920bf0950 (patch) | |
| tree | 47703f960633d3d4580022583134c28b96d5f36e /std/iter.zc | |
| parent | 526b7748cafcb5a00f8e30df88661f6059d79843 (diff) | |
Iterables and iterators :D
Diffstat (limited to 'std/iter.zc')
| -rw-r--r-- | std/iter.zc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/std/iter.zc b/std/iter.zc new file mode 100644 index 0000000..a4fdb59 --- /dev/null +++ b/std/iter.zc @@ -0,0 +1,9 @@ +import "./option.zc" + +trait Iterator<T> { + fn next(self) -> Option<T>; +} + +trait Iterable<T> { + fn iterator(self) -> Iterator<T>; +} |
