!foo should use (!) ∘ foo #44748
Labels
feature
Indicates new feature / enhancement requests
good first issue
Indicates a good issue for first-time contributors to Julia
As discussed on Discourse, it would be nice to have
!foo
return aComposedFunction
, which would!foo
!foo
as"!foo"
rather than as"#xx (generic function with 1 method)"
(by overloadingshow
forComposedFunction{typeof(!)}
)!!foo === foo
Although
!foo
andf ∘ g
were introduced at the same time in #17155, when∘
was subsequently updated in Julia 1.6 to return a specialComposedFunction
type (#37517), the!
implementation was not correspondingly updated, which seems like an oversight.On a related note, it would also be good to fix the
ComposedFunction
show method to put parentheses around operators (or other composed functions), as this is currently broken:Should be a fairly easy PR.
The text was updated successfully, but these errors were encountered: