# Check module functions and method definitions

**URL:** <https://discourse.julialang.org/t/check-module-functions-and-method-definitions/10337>\
**Category:** New to Julia\
**Created:** [April 14, 2018, 5:55pm UTC](https://discourse.julialang.org/t/check-module-functions-and-method-definitions/10337 "2018-04-14T17:55:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![han-so1omon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/han-so1omon/32/4398_2.png) [@han-so1omon](https://discourse.julialang.org/u/han-so1omon)\
**Post date:** [April 14, 2018, 5:55pm UTC](https://discourse.julialang.org/t/check-module-functions-and-method-definitions/10337/1 "2018-04-14T17:55:30Z")

</div>

Are there functions to check module functions and method definitions?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 15, 2018, 7:04am UTC](https://discourse.julialang.org/t/check-module-functions-and-method-definitions/10337/2 "2018-04-15T07:04:53Z")

</div>

Please clarify what “check” means in this context. Do you mean [unit tests](https://docs.julialang.org/en/latest/stdlib/Test/#Unit-Testing-1)?

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [April 15, 2018, 6:10pm UTC](https://discourse.julialang.org/t/check-module-functions-and-method-definitions/10337/3 "2018-04-15T18:10:02Z")

</div>

If you are in the REPL, you can type

```nohighlight
julia> ModuleName.

```

And then press the ‘tab’ key twice, you will get a list of all methods in that module.

There is also the `methods(..)` method.

---

<div class="post-metadata">

**Author:** ![han-so1omon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/han-so1omon/32/4398_2.png) [@han-so1omon](https://discourse.julialang.org/u/han-so1omon)\
**Post date:** [April 18, 2018, 2:16am UTC](https://discourse.julialang.org/t/check-module-functions-and-method-definitions/10337/4 "2018-04-18T02:16:53Z")

</div>

True, I should have clarified. @chakravala interpreted my request correctly.

---

<div class="post-metadata">

**Author:** ![han-so1omon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/han-so1omon/32/4398_2.png) [@han-so1omon](https://discourse.julialang.org/u/han-so1omon)\
**Post date:** [April 18, 2018, 2:16am UTC](https://discourse.julialang.org/t/check-module-functions-and-method-definitions/10337/5 "2018-04-18T02:16:55Z")

</div>

How does `methods(...)` work?

---

<div class="post-metadata">

**Author:** ![tk3369](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tk3369/32/2824_2.png) [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Post date:** [April 18, 2018, 4:18am UTC](https://discourse.julialang.org/t/check-module-functions-and-method-definitions/10337/6 "2018-04-18T04:18:03Z")

</div>

```julia
help?> methods
search: methods methodswith method_exists Method MethodTable MethodError

  methods(f, [types])

  Returns the method table for f.

  If types is specified, returns an array of methods whose types match.

julia> methods(mean)
# 6 methods for generic function "mean":
mean(r::Range{#s45} where #s45<:Real) in Base at range.jl:858
mean(f::Union{Function, Type}, A::AbstractArray) in Base at statistics.jl:35
mean(f::Union{Function, Type}, iterable) in Base at statistics.jl:19
mean(A::AbstractArray) in Base at statistics.jl:36
mean(A::AbstractArray{T,N} where N, region) where T in Base at statistics.jl:57
mean(iterable) in Base at statistics.jl:34

```
