添加lambda表达式

This commit is contained in:
2025-06-20 15:50:39 +08:00
parent fc339cf894
commit 362dc08ba5
9 changed files with 229 additions and 4 deletions

26
soft/lambda.h Normal file
View File

@@ -0,0 +1,26 @@
#ifndef lambda_h__
#define lambda_h__
#include "stdint.h"
#define lambda(...) 0
#define lambda_use
/*
使用方法
在c文件开头添加
lambda_use
然后在需要使用lambda的地方添加
lambda(
void (int a, int b){
printf("%d + %d = %d\n", a, b, a+b);
}
)
*/
#endif