Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/src/manual/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -1075,13 +1075,13 @@ julia> string.(1:3, ". ", ["First", "Second", "Third"])
```

Sometimes, you want a container (like an array) that would normally participate in broadcast to be "protected"
from broadcast's behavior of iterating over all of its elements. By placing it inside another container
(like a single element [`Tuple`](@ref)) broadcast will treat it as a single value.
from broadcast's behavior of iterating over all of its elements. By placing it inside another container,
like a single-element [`Tuple`](@ref) or a [`Ref`](@ref) (which acts like a 0-dimensional array), broadcast will treat it as a single value rather than as a container.
```jldoctest
julia> ([1, 2, 3], [4, 5, 6]) .+ ([1, 2, 3],)
([2, 4, 6], [5, 7, 9])

julia> ([1, 2, 3], [4, 5, 6]) .+ tuple([1, 2, 3])
julia> ([1, 2, 3], [4, 5, 6]) .+ Ref([1, 2, 3])
([2, 4, 6], [5, 7, 9])
```

Expand Down