Dextruct v0.1.0 Dextruct View Source

Destructing assignment operator and utilities.

Link to this section Summary

Functions

Dextruct operator <~ imitate the destruction assignment behavior on other language like Ruby and ES6

Link to this section Functions

Link to this macro __using__(opts \\ []) View Source (macro)

Dextruct operator <~ imitate the destruction assignment behavior on other language like Ruby and ES6.

Link to this function fetch_keys_or_length(list) View Source
Link to this function fill(enum, length_or_keys, elem \\ nil) View Source
fill(Enum.t, integer | list, any) :: Enum.t

Hello world.

Examples

iex> Dextruct.fill([1], 3)
[1, nil, nil]

Example

iex> Dextruct.fill(%{a: 1}, [:a, :b, :c])
%{a: 1, b: nil, c: nil}
Link to this macro sigil_m(arg, opt) View Source (macro)