Skip to content

Conversation

markmbaum
Copy link
Contributor

@markmbaum markmbaum commented Mar 25, 2022

Closes #44748 , this small PR does the following

  • redefines predicate function negation !(f::Function) = (!) ∘ f
  • updates the show method for ComposedFunction to print operators in parentheses
  • adds a method for !(f::ComposedFunction{typeof(!)}) that allows !!f === f
  • adds a test for !!f === f and a few tests for showing composed functions

thanks for the tutelage @stevengj !

stevengj
stevengj previously approved these changes Mar 29, 2022
@stevengj stevengj added the needs news A NEWS entry is required for this change label Mar 29, 2022
@stevengj
Copy link
Member

Should have an item in NEWS.md.

@stevengj stevengj dismissed their stale review March 29, 2022 18:19

news and docs

@stevengj stevengj added needs docs Documentation for this change is required needs compat annotation Add !!! compat "Julia x.y" to the docstring and removed needs docs Documentation for this change is required needs news A NEWS entry is required for this change needs compat annotation Add !!! compat "Julia x.y" to the docstring labels Mar 29, 2022
@stevengj stevengj added the merge me PR is reviewed. Merge when all tests are passing label Apr 2, 2022
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
@DilumAluthge
Copy link
Member

cmdlineargs failures on test_x86_64-apple-darwin are #44947

@DilumAluthge DilumAluthge merged commit d4e26c8 into JuliaLang:master Apr 12, 2022
@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label Apr 12, 2022
@StefanKarpinski
Copy link
Member

Nice work and thanks, @markmbaum! Great contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

!foo should use (!) ∘ foo

7 participants