# hello-zig **Repository Path**: wujilingfeng/hello-zig ## Basic Information - **Project Name**: hello-zig - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-21 - **Last Updated**: 2025-06-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ```zig comptime fn curry(comptime fn: anytype) anytype { // 获取函数的参数类型 const paramTypes = @typeInfo(@typeOf(fn)).Fn.params; // 递归地创建柯里化函数 if (paramTypes.len == 0) { // 没有参数,返回原始函数 return fn; } else { // 创建一个接受第一个参数并返回剩余参数的柯里化函数 const firstParamType = paramTypes[0].type; const remainingParams = paramTypes[1..]; // 使用@Type创建新的函数类型 const newFnType = @Type(.{ .Fn = .{ .params = &[_]Type.{firstParamType}, .return_type = curry(@typeOf(fn(firstParamType))), }, }); return @unionTagged(newFnType, CurryTag, CurryState{ .fn = fn, .paramsApplied = 0 }); } } ``` lzma2算法可以调用多线程,目前gzip压缩算法支持度最好 $B_{i,1}\left(\mu\right)=\left\{ \right.$ 后端开发使用go+gin