Argument Names v0.2.1 ArgumentNames View Source

Documentation for ArgumentNames.

Link to this section Summary

Functions

Defines a public function with named arguments

Defines a private function with named arguments

Link to this section Functions

Link to this macro

defnamed(call, list)

View Source (macro)

Defines a public function with named arguments

Examples

defmodule Foo do

require ArgumentNames
import ArgumentNames

defnamed div(first, second) do
  first / second
end

end

Foo.div(2, 4) #=> 0.5

Foo.div(second ~> 4, 2) #=> 0.5

Link to this macro

defnamedp(call, list)

View Source (macro)

Defines a private function with named arguments

Examples

defmodule Foo do require ArgumentNames import ArgumentNames

defnamedp div(first, second) do

first / second

end end