Stone v0.1.0 Stone.Arguments

Processing argument lists in Elixir macros.

Summary

Functions

Clears default parameter values from argument list

Take a list of function arguments and pack them into a tuple

Functions

clear_default_arguments(argument_list)

Clears default parameter values from argument list.

Examples

iex> Stone.Arguments.clear_default_arguments(quote(do: [x, y \\ 2, z \\ 3]))
quote(do: [x, y, z])
pack_values_as_tuple(values)

Take a list of function arguments and pack them into a tuple.

Examples

iex> Stone.Arguments.pack_values_as_tuple(quote(do: [1, 2, 3]))
quote(do: {1, 2, 3})

iex> Stone.Arguments.pack_values_as_tuple(quote(do: [x, y, z]))
quote(do: {x, y, z})