-
Notifications
You must be signed in to change notification settings - Fork 319
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
Add array_chunks
and array_windows
?
#1012
Comments
Another question, do we also want a |
A PME is always preferable to a runtime error, but, if possible, I'd prefer We definitely want a |
I'd suggest not doing that, actually, because while it's implementable, it means that it'd be no longer be correct to |
Yeah, good point. PME, please, then. |
Now that
next_array
exists, it's not so hard to write the methodsarray_chunks
(functionally equivalent tofrom_fn(|| self.next_array())
) andarray_windows
, similar to the unstableslice::array_chunks
andslice::array_windows
respectively. However it's similarly unclear whatarray_chunks<0>
andarray_windows<0>
should do. Does it make sense to emit a post-monomorphization (but still compile-time) error, via sayconst { assert!(N > 0) }
? Or is it better to produce run-time errors?Is the name
arrays
preferable toarray_chunks
, to be consistent withItertools::tuples
?The text was updated successfully, but these errors were encountered: