[erlang-questions] [clarify] edoc: using @spec tag for a fun type

Csaba Hoch csaba.hoch@REDACTED
Sun Jun 29 20:38:03 CEST 2008


Hi,

I have an edoc question: if I define a fun type with @type, can I use
it when I define a function with @spec?

I mean something like this:

%% @type number_fun = ((number()) -> number()).

%% @spec f = number_fun()
f(X) ->
    2*X.

But my version doesn't work.
Is it possible to do something similar?

Thank you,
Csaba



More information about the erlang-questions mailing list