better docs

This commit is contained in:
sergeych committed 2025-06-13 18:02:34 +04:00
1 parent cfb2f7f128
commit 89427de5cd
2 files changed
+7 -2

No files matched your search

+6 -1
View File
@@ -96,9 +96,14 @@ arguments list in almost arbitrary ways. For example:
// Swap first and last arguments in the call
fun swap_args(first, others..., last, f) { f(last, ...others, first) }
fun glue(args...) {
var result = ""
for( a in args ) result += a
}
assertEquals(
"321",
swap_args( 1, 2, 3 ) { a, b, c -> "" + a + b + c }
swap_args( 1, 2, 3, glue)
)
>>> void