An example in the manual about conditions within comprehensions would be great

It’s actually there:

Generated values can be filtered using the if keyword:

julia> [(i,j) for i=1:3 for j=1:i if i+j == 4]
2-element Vector{Tuple{Int64, Int64}}:
 (2, 2)
 (3, 1)

Or, on the top of each page there is a link “Edit on GitHub”. Just try it it’s easy enough.

2 Likes