Published 4 weeks ago
by
piotrgajow
with tags
webappcraft

def calculate(a, b) { def sum = a + b def diffAB = a - b def diffBA = b - a return [sum, diffAB, diffBA] } def (sum, diff1, diff2) = calculate(5, 3) assert sum == 8 assert diff1 == 2 assert diff2 == -2