given an int, return the terms of its hailstone sequence in swift