I think #44 can be done more simply:
using LinearAlgebra: norm a = rand(10, 2) mapreduce(vcat, eachrow(a)) do r [norm(r) atan(r...)] end
Similarly for #50:
A = rand(10) x = 0.5 findmin(a -> abs(a - x), A)
(or minimum(a -> abs(a - x), A) if you just want the value of abs(a - x) as in your solution)
minimum(a -> abs(a - x), A)
abs(a - x)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
A fresh approach to technical computing.
I think #44 can be done more simply:
Similarly for #50:
(or
minimum(a -> abs(a - x), A)
if you just want the value ofabs(a - x)
as in your solution)