better docs/2

This commit is contained in:
Sergey Chernov 2025-06-13 18:03:51 +04:00
parent 89427de5cd
commit ef266b73a2

View File

@ -93,8 +93,10 @@ Lambda functions remember their scopes, so it will work the same as previous:
With ellipsis and splats you can create partial functions, manipulate
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) }
// Swap first and last arguments for call
fun swap_args(first, others..., last, f) {
f(last, ...others, first)
}
fun glue(args...) {
var result = ""