Skip to content

Allow guards in with and for matches  #4015

@zambal

Description

@zambal

As discussed here:
https://groups.google.com/d/msg/elixir-lang-core/lzNhT87-XUU/Wn4EANOkEQAJ

This would make patterns like this possible:

iex> with x when x < 2 <- 4, do: :ok
4

iex> with x when x > 2 <- 4, do: :ok
:ok

and

iex> for x when x < 2 <- 1..4, do: x
[1]

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions