hi guys i’ve just noticed that functions declared ...
# announcements
n
hi guys i’ve just noticed that functions declared inside functions cannot be used before they have been declared 🤔 so i get this kind of sequence:
Copy code
fun main(args: Array<String>) {

    val client = Client("url", "key", "secret")

    fun Command.execute() = client.execute(this).third.fold({ println(it) }, { throw it })

    ListVolume().execute()
    ListFirewallRules().execute()
}
i would like to have it at the end, as an implementation detail anyone can confirm? and tell me whether i can do it otherwise to make it more readable also, i would be interested in the reason and if it might change in the future