Suppose I have such a module
module Foo
abstract type Bar end
function do_something(bar::Bar)
bar_prepared = prepare(bar)
"do something"
end
end
My intention for the user is that the user will define a concrete type that is a subtype of Bar
and define a function prepare
on that concrete type. Then they can call do_something
in my module.
Right now, I declare the function by define a dummy function
function prepare()
return nothing
end
but I am not happy with this. What would be your suggestion?