GenServerMagic v0.0.7 GenServerMagic.Utils View Source
Link to this section Summary
Functions
Names an argument based on its position
Returns only named arguments (excludes pattern matching and default values)
(%{}, arg \\ [])
becomes (gsm_arg0, arg)
Adds names to all unnamed args
Gives every argument a unique name replacing existing named arguments
(%{}, arg \\ [])
becomes (%{} = gsm_arg0, gsm_arg1 \\ [])
Removes the pattern from named arguemnts
Removes the metadata from an argument AST
Removes the default value from optional arguments
Link to this section Functions
Names an argument based on its position
Returns only named arguments (excludes pattern matching and default values)
(%{}, arg \\ [])
becomes (gsm_arg0, arg)
Adds names to all unnamed args
(%{})
becomes (%{} = gsm_arg0)
Gives every argument a unique name replacing existing named arguments
(%{}, arg \\ [])
becomes (%{} = gsm_arg0, gsm_arg1 \\ [])
Removes the pattern from named arguemnts
(%{} = map)
becomes (map)
Removes the metadata from an argument AST
{:var, [line: 42], MyModule}
becomes {:var, [], MyModule}
Removes the default value from optional arguments