forever package:automaton

Execute the stream until it throws an exception, then restart it. One might be tempted to define this function recursively with applyExcept, but this would result in a runtime error, trying to define an infinite state.