TIL about key-value pairs in Elixir
1 min readJul 17, 2017
Today I learned, that if you want to pass key-valued list in function, you can omit the brackets, e.g:
func_name key1: "value", key2: "another value"
It will be equals to this:
func_name [key1: "value", key2: "another value"]
UPD: Thanks to Dragos Tudorache to leave a little note about it. List of tuples have to be the last argument of a function :)
Have fun and program Elixir 🍶