better docs/2
This commit is contained in:
parent
89427de5cd
commit
ef266b73a2
@ -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
|
With ellipsis and splats you can create partial functions, manipulate
|
||||||
arguments list in almost arbitrary ways. For example:
|
arguments list in almost arbitrary ways. For example:
|
||||||
|
|
||||||
// Swap first and last arguments in the call
|
// Swap first and last arguments for call
|
||||||
fun swap_args(first, others..., last, f) { f(last, ...others, first) }
|
fun swap_args(first, others..., last, f) {
|
||||||
|
f(last, ...others, first)
|
||||||
|
}
|
||||||
|
|
||||||
fun glue(args...) {
|
fun glue(args...) {
|
||||||
var result = ""
|
var result = ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user