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

Enable multiple function composition in prefix form #33568

Merged
merged 16 commits into from
Oct 16, 2019
Prev Previous commit
Next Next commit
Expand doctest
I was trying to minimize number of lines changed :)

Co-Authored-By: Stefan Karpinski <stefan@karpinski.org>
  • Loading branch information
JeffFessler and StefanKarpinski authored Oct 15, 2019
commit d7513a520553b4b5455a904235791eba789102bf
10 changes: 9 additions & 1 deletion base/operators.jl
Original file line number Diff line number Diff line change
@@ -839,7 +839,15 @@ julia> map(uppercase∘first, ["apple", "banana", "carrot"])
'B'
'C'

julia> fs = (x -> 2x, x -> x/2, x -> x-1, x -> x+1); f = ∘(fs...); f(3) == 3
julia> fs = [
x -> 2x
x -> x/2
x -> x-1
x -> x+1
];

julia> ∘(fs...)(3)
3.0
true
```
"""