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

Michael McDaniel <>
Sun Oct 28 20:52:17 CET 2007


  see http://autosys.us/misc/vipin.html function foo/2
  also http://autosys.us/misc/vipin.erl

  if I understand correctly your question...

~Michael


On Sun, Oct 28, 2007 at 03:18:28PM +0100, Hynek Vychodil wrote:
> 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
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 
> !DSPAM:52,47249a5450981775114153!
> 
> 

-- 
Michael McDaniel
Portland, Oregon, USA
http://autosys.us
+1 503 283 5284



More information about the erlang-questions mailing list