diff --git a/include/with99.h b/include/with99.h index 3166452..1573f96 100644 --- a/include/with99.h +++ b/include/with99.h @@ -14,7 +14,7 @@ #endif #define WITH99_MAJOR 2 -#define WITH99_MINOR 0 +#define WITH99_MINOR 1 #define WITH99_PATCH 0 #define WITH99_VERSION_COMPATIBLE(x, y, z) (WITH99_MAJOR == (x) && ((WITH99_MINOR == (y) && WITH99_PATCH >= (z)) || (WITH99_MINOR > (y)))) @@ -55,7 +55,19 @@ #define WITH99_With(...) ML99_EVAL(WITH99_with(v(__VA_ARGS__))) +#define WITH99_priv_multiple(...) ML99_variadicsForEach(v(WITH99_priv_create_stmt), v(__VA_ARGS__)) + #define WITH99_with(...) ML99_call(WITH99_with, __VA_ARGS__) -#define WITH99_with_IMPL(...) ML99_variadicsForEach(v(WITH99_priv_create_stmt), v(__VA_ARGS__)) +#define WITH99_with_IMPL(...) \ + ML99_appl(\ + ML99_if(\ + ML99_isTuple(ML99_variadicsGet(0)(v(__VA_ARGS__))),\ + ML99_compose(ML99_appl(v(ML99_variadicsForEach), v(WITH99_priv_create_stmt)), v(ML99_untuple)),\ + v(WITH99_priv_create_stmt)\ + ),\ + ML99_tuple(v(__VA_ARGS__))\ + ) + + #endif