Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to extend method Base.∘ in Julia

Tags:

julia

I'm trying to extend the method Base.∘.

Trying to define

function Base.∘(f₁::Transformation, f₂::Transformation)
    println("baz")
end

Gives the following error:

syntax: expected "end" in definition of function "Base"

What am I doing wrong? How can I extend it?

like image 830
aberdysh Avatar asked Oct 24 '25 21:10

aberdysh


1 Answers

function Base.:∘(f₁::Transformation, f₂::Transformation)
    println("baz")
end
like image 124
Chris Rackauckas Avatar answered Oct 26 '25 18:10

Chris Rackauckas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!