-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seq function returns #45
Comments
Merged
Merged
@puredanger Out of curiosity and documentation purposes I’d like to know some examples of this:
How can this be used if you cannot rely on a sequence function returning a sequence? You'd still have to call |
All sequence functions call seq on their inputs so "using" it already does this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In general, it is most flexible for sequence functions to be spec'ed as taking
seqable?
and returningseqable?
(notseq?
). The reasons for this are quite subtle, but there is a performance advantage to be had in cases where a sequence function can return something that avoids forcing the seq. We ran into this when the reducing/seqable work was done on range/cycle/iterate/repeat in 1.7. So, I'd just urge seqable? as the most generic alternative in most of those.The text was updated successfully, but these errors were encountered: