-
Notifications
You must be signed in to change notification settings - Fork 1
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
Naming bikeshedding for opcompose
(opposite composition function)
#3
Comments
Another possible ASCII-based API is to come up with something based on |>(x, f, g, h) == x |> f |> g |> h == h(g(f(x))) then This can be done with Implementation: struct Hole end
const _ARG_ = Hole()
Base.:|>(::Hole, functions...) = ∘(reverse(functions)...)
<|(args...) = |>(reverse(args)...) Usage: julia> |>(_ARG_, sin, cos, tan)
tan ∘ cos ∘ sin
julia> <|(sin, cos, tan, _ARG_)
sin ∘ cos ∘ tan This might be a bit too "fancy" as I want CompositionsBase.jl to be super conservative. Maybe this can be put in CompositionsX.jl or something. |
I like The Just to remind myself, ideally this package would be part of Base, it is currently not due to bad font support. |
OK, good to have one more "vote" to BTW, just for the record, some more related links:
|
I can't really think about a better name but I'd like to rename it if we find a better one.
cc @jw3126
The text was updated successfully, but these errors were encountered: