I’m testing out an unregistered, abandoned package from 2020 (FEDVR.jl) because it looks like it might actually suit my research needs. I dev’d it locally, tossed the old manifest file (so it would use the latest versions of its dependencies rather than pinning them to their 2020 versions), reran the tests (they all passed) and got to work.
Poking through the source code, there’s a few functions defined with a very odd syntax, found on lines 56-92 of basis.jl:
function (basis::Basis)(x::AbstractVector)
χ = spzeros(length(x),basecount(basis.grid))
evaluate!(basis, x, χ)
end
Leaving aside what this function is supposed to do for the moment, I’m confused by the syntax, which just has two argument types in parentheses and no function name. That same source file defines a type and constructor function Basis, so at first I thought maybe this was a variable function name, so that I could do something like
my_basis = Basis(r, n)
my_op = my_basis(x)
but that errors. Next I thought this was some type of strange anonymous function definition, but checking the docs shows nothing like this weird double-parenthetical syntax. I’m at quite a loss here, so any insight would be appreciated.