Short-circuiting a pipeline based on predicate
Is there any way to short-circuit a pipeline given a condition? I have a function to refresh credentials, but if the creds aren't expiring I want to short circuit my pipeline and return the credentials early:
This would be very easy with generators, just return early. But how would I accomplish the same with pipe?
This would be very easy with generators, just return early. But how would I accomplish the same with pipe?
