-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[erlang] Order qualifiers left to right in comprehensions
Summary: Previously, if there was a (list/map) comprehension of the form `Expr || Gen1, Filter1, Gen2, Filter2, ...` we always rearranged it so that the generators came first: `Expr || Gen1, Gen2, ..., Filter1, Filter2, ...`. Not sure why, though, because they should be evaluated left to right, and there can be cases where reordering results in different behavior, see new test added. I think when I first implemented this translation, it was conceptually easier to think of it as: "let's generate all the potential values using nested loops, and then check the filters once we have all the variables bound". Reviewed By: rgrig, thizanne Differential Revision: D62128527 fbshipit-source-id: 3a1dae52d56c60cadd85f04700d4adf4897b62f5
- Loading branch information
1 parent
510ec11
commit af22ebe
Showing
4 changed files
with
47 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters