## Broadcasting in Julia

By using Ref(), it protects the object inside it from being iterated over. Supoose we define the following function fun. See the examples below that demonstrate how broadcasting works: fun(a,x)=a.-x Case 1: fun.([1,2], [3,4]) Note that without Ref(), both arguments of function fun are interated over from broadcasting. This implies that each element within each argument will be computed element-wise. ([1-3, 2-4]) 2-element Vector{Int64}: -2 -2 Case 2: fun.([1,2], Ref([3,4])) Note that Ref() protects [3,4]....