Note:  you can actually return an array rather than a reference to an array from `contFrac` so the you don't have dereference it here.