Fork me on GitHub
#specter
<
2019-08-13
>
puzzler22:08:35

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.

puzzler23:08:25

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.

puzzler23:08:49

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?

puzzler23:08:40

Or maybe just use select-any and stick (nil->val nil) at the end of the navigator?

puzzler23:08:37

Ah, select-any returns nil in that particular case anyway. Never mind.