I think adding an early stopping version oflax.scanis a good idea. It's not trivial though. Notes to self: we'd probably need to add a jaxpr for the early-stopping function, and also add 'start' and 'stop' arguments to the scan for the linearized case. As@shoyerobserved, we'd al...