Instead of doing this: defmodule LousyCalculator do @spec add(number, number) :: {number, String.t} def add(x, y), do: {x + y, "You need a calculator to do that?!"}
@spec multiply(number, number) :: {number, String.t} def multiply(x, y), do: {x * y, "Jeez, come on!"} end How about this: defmodule LousyCalculator do @specdef add(x number, y number) :: {number, String.t} do: {x + y, "You need a calculator to do that?!"} @specdef multiply(x number, y number) :: {number, String.t} do: {x * y, "Jeez, come on!"} end -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/ac230011-82c2-4c44-8c4b-58fd163ec081%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.