mirror of
https://codeberg.org/kaasboteram/zig-iterating.git
synced 2025-12-15 09:43:14 +01:00
Reformatted Iter example usage
This commit is contained in:
parent
50b1919d03
commit
1d7ef3ab9d
1 changed files with 7 additions and 5 deletions
12
src/root.zig
12
src/root.zig
|
|
@ -36,11 +36,13 @@ test Iter {
|
|||
|
||||
const items = try Iter(i32)
|
||||
.once(-100)
|
||||
.chain(Iter(i32)
|
||||
.rangeInclusive(1, 100)
|
||||
.filter(arith.is_square)
|
||||
.chain(Iter(i32)
|
||||
.range(0, 10)))
|
||||
.chain(
|
||||
Iter(i32)
|
||||
.rangeInclusive(1, 100)
|
||||
.filter(arith.is_square)
|
||||
.chain(Iter(i32)
|
||||
.range(0, 10)),
|
||||
)
|
||||
.toOwnedSlice(gpa);
|
||||
|
||||
defer gpa.free(items);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue