[erlang-questions] beginer: How to specify multifunction in edoc

Hynek Vychodil vychodil.hynek@REDACTED
Sun Oct 28 15:18:28 CET 2007


Hello,
I don't know how to write specification of function with many
patterns. For example how to specify this simple function

foo(X, Y) when is_integer(X), is_integer(Y) -> true;
foo(X, Y) when is_atom(X), is_atom(Y) -> false.

What should I write when I want to see in documentation that there
must be both parameters same type. I would like see in documentation
some like

foo(X::integer(), Y::integer()) -> true;
foo(X::atom(), Y::atom()) -> false.

Best
-- Hynek (Pichi) Vychodil



More information about the erlang-questions mailing list