We store the last result when processing input so that we know not to process any more input if it was an error.
See Implementation
We store the last result when processing input so that we know not to process any more input if it was an error.