P i
P i

Reputation: 30684

How do I list all overloads for a particular Julia function?

Julie allows multiple dispatch.

So we can overload foo:

foo(x::String)
foo(x::Float)

But how to retrieve all overloads currently in effect? (preferably together with filepath).

I was hoping for something like: listoverloads("foo")

Upvotes: 2

Views: 194

Answers (1)

Chris Rackauckas
Chris Rackauckas

Reputation: 19132

Use the command methods(foo).

Upvotes: 4

Related Questions