-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 tuple_type to the Tuple manipulation API #24312
Comments
Why is there a need to convert from |
For type calculations, it would be useful to have an interface which extracts You are right, |
+1. By analogy with |
fieldtypes(T::Type{<: Tuple}) = ntuple(i -> fieldtype(T, i), nfields(T)) does what I want. But I am still wondering why there is no API for this: is it something I am not supposed to do, and use some kind of lispy recursion instead with the existing head/tail API? |
Should be |
We have
tuple_type_head
andtuple_type_tail
, but it would be nice to have something that is just equivalent toCurrently one needs to extract
T.parameters
, convert from thesvec
, deal withVararg
tuples manually, etc.The text was updated successfully, but these errors were encountered: