https://kotlinlang.org logo
n

nfrankel

04/14/2018, 7:28 AM
i’ve changed it so now i have the reading order that i want:
Copy code
val client = Client("api", "key", "secret")

fun main(args: Array<String>) {

    ListVolume().run()
    ListFirewallRules().run()
}

fun Command.run() = client.execute(this).third.fold(
        { println(it) },
        { throw it })
it leaks more but is more readable imho