Skip to content

Commit

Permalink
Function composition for multiple functions (JuliaLang/julia#33568)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Oct 16, 2019
1 parent 4fa5519 commit 2d2b2c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ Currently, the `@compat` macro supports the following syntaxes:

## Other changes

* Function composition now supports multiple functions: `∘(f, g, h) = f ∘ g ∘ h`
and splatting `∘(fs...)` for composing an iterable collection of functions ([#33568]).

## New types

## Developer tips
Expand Down Expand Up @@ -127,3 +130,4 @@ includes this fix. Find the minimum version from there.
[#29749]: https://github.com/JuliaLang/julia/issues/29749
[#32628]: https://github.com/JuliaLang/julia/issues/32628
[#33129]: https://github.com/JuliaLang/julia/issues/33129
[#33568]: https://github.com/JuliaLang/julia/pull/33568
5 changes: 5 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ if VERSION < v"1.3.0-alpha.8"
Base.mod(i::Integer, r::AbstractUnitRange{<:Integer}) = mod(i-first(r), length(r)) + first(r)
end

# https://github.com/JuliaLang/julia/pull/33568
if VERSION < v"1.4.0-DEV.329"
Base.:(f, g, h...) = (f g, h...)
end

include("deprecated.jl")

end # module Compat

0 comments on commit 2d2b2c7

Please sign in to comment.