Is there a way to refer to a specification for a function return type in other function specifications?
defmodule Car do
@spec beep(none()) :: String.t
def beep do
"beep"
end
@spec beep_log(none()) :: String.t
def beep_log do
IO.puts "beep log"
beep
end
end
Is it possible to specify specifications for beep_log something like this:
@spec beep_log(none()) :: beep()
source
share