Skip to content

Commit

Permalink
add documentation for Function type (#21649)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0be9996)
  • Loading branch information
Nathan Smith authored and tkelman committed May 4, 2017
1 parent e6f48c3 commit 8774627
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
18 changes: 18 additions & 0 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -692,4 +692,22 @@ run(pipeline(`cat test.txt`, DevNull))
"""
DevNull

"""
Function
Abstract type of all functions.
```jldoctest
julia> isa(+, Function)
true
julia> typeof(sin)
Base.#sin
julia> ans <: Function
true
```
"""
Function

end
17 changes: 17 additions & 0 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,23 @@ Types
Generic Functions
-----------------

.. data:: Function

.. Docstring generated from Julia source
Abstract type of all functions.

.. doctest::

julia> isa(+, Function)
true

julia> typeof(sin)
Base.#sin

julia> ans <: Function
true

.. function:: method_exists(f, Tuple type) -> Bool

.. Docstring generated from Julia source
Expand Down

0 comments on commit 8774627

Please sign in to comment.