Do we care about the verbosity of the resulting JavaScript? Adding `return` here would obviate the need for accumulation in both branches.