javascript: abstracted tailcalls