RosettaCodeData/Task/Higher-order-functions/Groovy/higher-order-functions-2.groovy
2023-07-01 13:44:08 -04:00

4 lines
82 B
Groovy

def first(func) { func() }
def second() { println "second" }
first(this.&second)