What is Ref?

The first evaluates to

julia> [
           isa([1, 2, 3], Array),
           isa([1, 2, 3], Dict),
           isa([1, 2, 3], Int),
       ]
3-element Vector{Bool}:
 1
 0
 0

and the second to

julia> [
           isa(1, Array),
           isa(2, Dict),
           isa(3, Int),
       ]
3-element Vector{Bool}:
 0
 0
 1

The Ref makes the argument a “scalar” or “atom” in broadcasting.

9 Likes