You can use filter directly like this. There is no need for comprehension.
L = [(2,3), (5,6), (4,6)];
E = [2,5,7,3];
filter(x->first(x) in E, L)
2-element Vector{Tuple{Int64, Int64}}:
(2, 3)
(5, 6)
You can use filter directly like this. There is no need for comprehension.
L = [(2,3), (5,6), (4,6)];
E = [2,5,7,3];
filter(x->first(x) in E, L)
2-element Vector{Tuple{Int64, Int64}}:
(2, 3)
(5, 6)