View Source ExAequoColors.Keywords (ExAequoColors v0.1.1)
Tools to access keywords (to be moved to ExAequoBase)
Summary
Functions
Get first present value from a keyword list
Functions
Get first present value from a keyword list
iex(1)> access_or([a: 1, b: 2], [:b, :a])
2
iex(2)> access_or([a: 1, b: 2], [:x, :y])
nil
or an explicit default
iex(3)> access_or([a: 1, b: 2], [:x, :y], :not_found)
:not_found