aberdysh
aberdysh

Reputation: 1664

How to extend method Base.∘ in 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?

Upvotes: 4

Views: 832

Answers (1)

Chris Rackauckas
Chris Rackauckas

Reputation: 19132

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

Upvotes: 8

Related Questions