diff --git a/base/generator.jl b/base/generator.jl index b0f7e32d0b22f..7cd075d255b01 100644 --- a/base/generator.jl +++ b/base/generator.jl @@ -5,8 +5,8 @@ Given a function `f` and an iterator `iter`, construct an iterator that yields the values of `f` applied to the elements of `iter`. -The syntax `f(x) for x in iter [if cond(x)::Bool]` is syntax for constructing an instance of this -type. The `[if cond(x)::Bool]` expression is optional and acts as a "guard", effectively +The syntax for constructing an instance of this type is `f(x) for x in iter [if cond(x)::Bool] `. +The `[if cond(x)::Bool]` expression is optional and acts as a "guard", effectively filtering out values where the condition is false. ```jldoctest