Skip to content

Commit

Permalink
add an operate method for abs
Browse files Browse the repository at this point in the history
Fixes #241
  • Loading branch information
nsajko committed Nov 27, 2023
1 parent 6e6a854 commit cbcdbbc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ function operate end
# custom `operate` method.
operate(::typeof(-), x) = -x

operate(::typeof(abs), x) = abs(x)

Check warning on line 193 in src/interface.jl

View check run for this annotation

Codecov / codecov/patch

src/interface.jl#L193

Added line #L193 was not covered by tests

function operate(
op::Union{
typeof(+),
Expand Down

0 comments on commit cbcdbbc

Please sign in to comment.