Thatβs really up to you. The function is called catstr so itβs actually very reasonable to restrict the input to a collection of Strings like Vector{String}. Then itβs a matter of making sure your inputs fit. Vector{Any} doesnβt fit because you could put non-strings in there. To make an empty Vector{String}, do arr = String[]. That change alone makes your code work again.
If you want to expand what catstr works on, you could change the argument annotation. Removing it entirely is the same as ::Any, which allows many inputs that error at the reduce call. ::Vector would allow vectors containing other things, which could let the reduce call work but in a way that doesnβt fit the name catstr. Off the top of my head, the most liberal annotation fitting the name would be catstr(arr::AbstractArray{T,N} where N) where T<:AbstractString.
On a separate note, this is pretty inefficient because every call to * allocates a new string, Better to call join. To implement this sort of function yourself, write to an IOBuffer that you convert to a string at the end.
In particular, a more general signature would be function catstr(arr::AbstractVector{<:AbstractString}). (However, you can always broaden the types later.)
Using this package involves implementing the abstract tree interface which, at a minimum, requires defining the function AbstractTrees.children for an object.
By defining how to get all children from a Type object (= simply look up its subtypes), we can immediately print the whole type tree βunterneathβ (or βaboveβ ? ) the given type.