RosettaCodeData/Task/Higher-order-functions/Groovy/higher-order-functions-2.gr...

5 lines
82 B
Groovy

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