Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ComposedFunction as a public API #37517

Merged
merged 15 commits into from
Sep 24, 2020
Prev Previous commit
Next Next commit
improve ComposedFunction docstring
  • Loading branch information
jw3126 committed Sep 17, 2020
commit d96d24d7540d93daaec787830753821adad67037
6 changes: 5 additions & 1 deletion base/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,11 @@ function ∘ end
"""
Base.ComposedFunction{Outer,Inner} <: Function

Represents the composition of two callable objects `outer::Outer` and `inner::Inner`.
Represents the composition of two callable objects `outer::Outer` and `inner::Inner`. That is
```julia
ComposedFunction(outer, inner)(args...; kw...) === outer(inner(args...; kw...))
```
The preferred way to construct instance of `ComposedFunction` is to use the composition operator [`∘`](@ref):
```jldoctest
julia> sin ∘ cos === Base.ComposedFunction(sin, cos)
true
Expand Down