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>) { | |
runSimulation() | |
} | |
fun runSimulation() { | |
val greetingFunction = configureGreetingFunction() | |
println(greetingFunction("Guyal")) | |
} | |
fun configureGreetingFunction(): (String) -> String { |
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
import kotlin.Unit; | |
import kotlin.jvm.functions.Function1; | |
import org.jetbrains.annotations.NotNull; | |
import org.jetbrains.annotations.Nullable; | |
import java.io.IOException; | |
import java.util.function.Function; | |
public class Jhava { |
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
@file:JvmName("Hero") | |
import java.io.IOException | |
fun main(args: Array<String>) { | |
val adversary = Jhava() | |
println(adversary.utterGreeting()) | |
val friendshipLevel = adversary.determineFriendshipLevel() | |
println(friendshipLevel?.toLowerCase() ?: "It's complicated.") |