Map.new/2
Instead of leveraging Enum.into/2
you can use Map.new/2
with an enumerable collection.
Pattern matching structs
I learned that you can pattern match structs.
def new(%_{} = struct), do: new_from_enum(struct)
August 22, 2022
Instead of leveraging Enum.into/2
you can use Map.new/2
with an enumerable collection.
I learned that you can pattern match structs.
def new(%_{} = struct), do: new_from_enum(struct)