Skip to content
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

Generalized list pattern match #1618

Open
raviqqe opened this issue Nov 12, 2022 Discussed in #1408 · 0 comments
Open

Generalized list pattern match #1618

raviqqe opened this issue Nov 12, 2022 Discussed in #1408 · 0 comments
Labels
enhancement New feature or request

Comments

@raviqqe
Copy link
Contributor

raviqqe commented Nov 12, 2022

Discussed in #1408

Originally posted by raviqqe September 3, 2022

Problem

  • Taking initial or last elements is common operations on lists.

Examples

Solution

  • Generalize if-list expressions.
if [x, y, z, ...xs, v, w] = xs {
  ...
} else {
  ...
}

References

@raviqqe raviqqe added the enhancement New feature or request label Nov 12, 2022
@raviqqe raviqqe added this to main Nov 12, 2022
@raviqqe raviqqe moved this to Todo in main Nov 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant