AbstractNumbers.like
— Methodlike(num::Union{AbstractNumber,AbstractReal}, x::T)
Creates a number from x
like the first argument. It discards the eltype of num
and uses the type of x
instead. usage: like(MyAbstractNumber(1f0), 22) === MyAbstractNumber{Int}(22)