Is there a variant of select that returns a lazy sequence instead of a vector? I've tried things like (sequence (traverse ...)) but that doesn't work.
@puzzler no
but select-first
and select-any
early terminate if that's what you're looking for
No, I need a lazy sequence because I'm producing a potentially large return value for a library API, and I don't know how people will consume it. But thanks for the info. I didn't realize select-first had early termination, since doc says it is no more efficient that select.
For use case where you are substituting an existing get-in call where you want a nil return value, would you use select-first, select-one, or would you use select-any and then call its return value with a function to convert NONE to nil?
Or maybe just use select-any and stick (nil->val nil) at the end of the navigator?
Ah, select-any returns nil in that particular case anyway. Never mind.