colors = [{:primary, "red"}, {:secondary, "green"}]
# [primary: "red", secondary: "green"]
colors[:primary]
# "red" # elixir scroll through all the element
colors = [primary: "red", secondary: "blue"] # this is also same semantic with different synthetic
colors = %{ primary: "red", primary: "blue" } # in case of map, it overwrites.
# %{primary: "blue"}
colors = [primary: "red", primary: "blue"]
# [primary: "red", primary: "red"] # This kind of non-overwriting feature helps in DB (ecto)
query = User.find_where([where: user.age> 10, where: user.subscribed ==true])
query = User.find_where(where: user.age> 10, where: user.subscribed ==true)
# this is also same. it looks like feeding two args, but it's same.
query = User.find_where where: user.age> 10, where: user.subscribed ==true
# this is also same. it looks like feeding two args, but it's same.