#!/usr/bin/ruby # ## https://rosettacode.org/wiki/Generic_swap # func swap(Ref a, Ref b) { (*b, *a) = (*a, *b); } var (x, y) = (1, 2); swap(\x, \y); say x; say y;