better docs
This commit is contained in:
parent
cfb2f7f128
commit
89427de5cd
@ -96,9 +96,14 @@ arguments list in almost arbitrary ways. For example:
|
|||||||
// Swap first and last arguments in the call
|
// Swap first and last arguments in the 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...) {
|
||||||
|
var result = ""
|
||||||
|
for( a in args ) result += a
|
||||||
|
}
|
||||||
|
|
||||||
assertEquals(
|
assertEquals(
|
||||||
"321",
|
"321",
|
||||||
swap_args( 1, 2, 3 ) { a, b, c -> "" + a + b + c }
|
swap_args( 1, 2, 3, glue)
|
||||||
)
|
)
|
||||||
>>> void
|
>>> void
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
|||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
group = "net.sergeych"
|
group = "net.sergeych"
|
||||||
version = "0.6.0-SNAPSHOT"
|
version = "0.6.1-SNAPSHOT"
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user