Skip to content

linear tuple type operators #105

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

Open
jorenham opened this issue Oct 23, 2024 · 0 comments
Open

linear tuple type operators #105

jorenham opened this issue Oct 23, 2024 · 0 comments

Comments

@jorenham
Copy link
Owner

an intuitive DRY way of writing repetitive tuple type argument patterns, e.g.

tuple[S, S, T, T, T, T, S, T, S, T, S, T]

could be written as

type Spam[S, T] = 2 * tuple[S] + 4 * tuple[T] + 3 * tuple[S, T]

or

type Spam[S, T] = 2 * (S,) + 4 * (T,) + 3 * (S, T)

this only involves the + and * binary infix operators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant