Alternatively, change this to return `void` and use `t` and `result` member variables.