Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lawrence-laz/zig-enumerable
Iterator tools for functional data processing.
https://github.com/lawrence-laz/zig-enumerable
enumerable functional iterators itertools linq zig zig-package
Last synced: 2 months ago
JSON representation
Iterator tools for functional data processing.
- Host: GitHub
- URL: https://github.com/lawrence-laz/zig-enumerable
- Owner: lawrence-laz
- License: mit
- Created: 2023-12-19T20:10:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-18T18:01:30.000Z (6 months ago)
- Last Synced: 2024-08-19T19:14:53.343Z (6 months ago)
- Topics: enumerable, functional, iterators, itertools, linq, zig, zig-package
- Language: Zig
- Homepage:
- Size: 124 KB
- Stars: 16
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zig Enumerable ⚡
Functional vibes for data processing as sequences.
```zig
const std = @import("std");
const enumerable = @import("enumerable");test "example" {
try expectEqualIter(
"(1,2,3)",
enumerable.from(std.mem.tokenizeAny(u8, "foo=1;bar=2;baz=3", "=;").buffer)
.where(std.ascii.isDigit)
.intersperse(',')
.prepend('(')
.append(')'),
);
}
```## 📦 Get started
```bash
zig fetch --save https://github.com/lawrence-laz/zig-enumerable/archive/master.tar.gz
``````zig
// build.zig
const enumerable = b.dependency("enumerable", .{
.target = target,
.optimize = optimize,
});exe.root_module.addImport("enumerable", enumerable.module("enumerable"));
```