This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main(args: Array<String>) { | |
println(sum(1, 3)) // 4 | |
println(sum2(1, 3)) // 4 | |
println(multiply(1, 3)) // 3 | |
println(subtract(1, 3)) // -2 | |
} | |
fun sum(a: Int, b: Int) | |
= higherOrderFunction(a, b, { a, b -> a + b }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main(args: Array<String>) { | |
println(sum(1, 3)) // 4 | |
} | |
fun sum(a: Int, b: Int) = higherOrderFunction2().let { | |
it(a, b) | |
} | |
fun higherOrderFunction2(): (Int, Int) -> Int { | |
return { a, b -> a + b } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | also | run #2 | apply | ||
---|---|---|---|---|---|
인자 (block) | (T) -> R | (T) -> Unit | T.() -> R | T.() -> Unit | |
반환 | block(this) | this | block() | this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run #1 | with | ||
---|---|---|---|
인자 | () -> R | T, T.() -> R | |
반환 | block() | receiver.block() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: assembleRelease | |
on: | |
create: | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val sample = "test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based from https://github.com/lima-vm/lima/blob/62159c9be1d8f00b3d7d7879ac87dec0d4ed65a7/examples/docker.yaml | |
# Example to use Docker instead of containerd & nerdctl | |
# $ limactl start ./docker.yaml | |
# $ limactl shell docker docker run -it -v $HOME:$HOME --rm alpine | |
# Hint: To allow `docker` CLI on the host to connect to the Docker daemon running inside the guest, | |
# add `NoHostAuthenticationForLocalhost yes` in ~/.ssh/config , and then run the following commands: | |
# $ export DOCKER_HOST=ssh://localhost:60006 | |
# $ docker ... |