return v0.0.2 Return

Provide the return keyword and the context where return works.

Example

defmodule MyModule do
  use Return

  func my_func do
    if true do
      return :ok
    end
    :error
  end
end

Summary

Macros

Define a public function in which the return keyword works

Define a private function in which the return keyword works

The return keyword itself

Macros

func(signature, list)

Define a public function in which the return keyword works.

funcp(signature, list)

Define a private function in which the return keyword works.

return(expr)

The return keyword itself.