diff --git a/bitwiseCopy.html b/bitwiseCopy.html index 10ed9b3..fddd304 100644 --- a/bitwiseCopy.html +++ b/bitwiseCopy.html @@ -127,7 +127,7 @@

Procs

diff --git a/expandFirst.html b/expandFirst.html index 2b1180c..5fd7056 100644 --- a/expandFirst.html +++ b/expandFirst.html @@ -132,7 +132,7 @@

Templates

diff --git a/namedWhile.html b/namedWhile.html index 6911796..ab96c69 100644 --- a/namedWhile.html +++ b/namedWhile.html @@ -106,7 +106,7 @@

Macros

diff --git a/reinterpretPtr.html b/reinterpretPtr.html index 66d4b58..b9edc21 100644 --- a/reinterpretPtr.html +++ b/reinterpretPtr.html @@ -94,7 +94,7 @@

Procs

diff --git a/replaceNimNodeTree.html b/replaceNimNodeTree.html index 7524e4c..6db0716 100644 --- a/replaceNimNodeTree.html +++ b/replaceNimNodeTree.html @@ -98,7 +98,7 @@

Procs

diff --git a/setLambda.html b/setLambda.html index b7383fb..09de934 100644 --- a/setLambda.html +++ b/setLambda.html @@ -102,7 +102,7 @@

Macros

diff --git a/staticDeque.html b/staticDeque.html index 4b08d7d..aadc282 100644 --- a/staticDeque.html +++ b/staticDeque.html @@ -319,7 +319,7 @@

Templates

diff --git a/staticSeq.html b/staticSeq.html index d2d803f..f89e160 100644 --- a/staticSeq.html +++ b/staticSeq.html @@ -381,7 +381,7 @@

Templates

diff --git a/theindex.html b/theindex.html index dedbe62..6ab7533 100644 --- a/theindex.html +++ b/theindex.html @@ -21,7 +21,7 @@

Index

- Modules: bitwiseCopy, expandFirst, namedWhile, reinterpretPtr, replaceNimNodeTree, setLambda, staticDeque, staticSeq, withAliases.

API symbols

+ Modules: bitwiseCopy, expandFirst, namedWhile, reinterpretPtr, replaceNimNodeTree, setLambda, staticDeque, staticSeq, unpackToArgs, withAliases.

API symbols

`==`:
+
unpackToArgs:
waCompileTime:
diff --git a/unpackToArgs.html b/unpackToArgs.html new file mode 100644 index 0000000..b60dc9b --- /dev/null +++ b/unpackToArgs.html @@ -0,0 +1,113 @@ + + + + + + + +src/littlesugar/unpackToArgs + + + + + + + + + + + + +
+
+

src/littlesugar/unpackToArgs

+
+
+
+ + +
+ +
+ Search: +
+
+ Group by: + +
+ + +
+
+ +
+ +

+
+

Macros

+
+
+
+
macro unpackToArgs(args: varargs[untyped]): untyped
+
+ +

Unpack tuples or arrrays to arguments for a procedure call or an array constructor.

+

All parameters excepts last one are tuple or array variable names, and the last parameter is a code block.

+ +

Example:

+
proc foo(x: int; y: string) =
+  doAssert x == 123 and y == "foo"
+
+let t = (123, "foo")
+unpackToArgs(t):
+  foo(t)
+ +
+
+ +
+ +
+
+ +
+
+ + +
+
+ + + + + + diff --git a/unpackToArgs.idx b/unpackToArgs.idx new file mode 100644 index 0000000..e94cbf8 --- /dev/null +++ b/unpackToArgs.idx @@ -0,0 +1,2 @@ +nimTitle unpackToArgs unpackToArgs.html module src/littlesugar/unpackToArgs 0 +nim unpackToArgs unpackToArgs.html#unpackToArgs.m,varargs[untyped] macro unpackToArgs(args: varargs[untyped]): untyped 32 diff --git a/withAliases.html b/withAliases.html index 80bb2e9..3ef564b 100644 --- a/withAliases.html +++ b/withAliases.html @@ -200,7 +200,7 @@

Templates