groovy-lecture/assignments/solutions/multiplier.groovy

6 lines
111 B
Groovy
Raw Normal View History

2024-06-09 20:55:46 +02:00
def makeMultiplier(n) {
return {it * n}
}
def multiplierOf3 = makeMultiplier(3)
println(multiplierOf3(5))