Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements flatmap #44792

Merged
merged 14 commits into from
Apr 7, 2022
Prev Previous commit
Next Next commit
docstring fix
  • Loading branch information
nlw0 committed Apr 5, 2022
commit dde1f9c9715ce4d3903430393f3dc83ff55ee2a0
2 changes: 1 addition & 1 deletion base/iterators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ julia> flatmap(n->-n:2:n, 1:3) |> collect
1
3

julia> flatmap(x -> (x+1)*x % 4 == 0 ? x*x : nothing, 1:11) |> collect
julia> flatmap(x -> (x+1)*x % 4 == 0 ? (x*x,) : (), 1:11) |> collect
nlw0 marked this conversation as resolved.
Show resolved Hide resolved
5-element Vector{Int64}:
9
16
Expand Down