Property lists are ordinary lists containing entries in the form
of either tuples, whose first elements are keys used for lookup and
insertion, or atoms, which work as shorthand for tuples
Property lists are useful for representing inherited properties, such as options passed to a function where a user can specify options overriding the default settings, object properties, annotations, and so on.
Two keys are considered equal if they match (
Similar to
Example:
append_values(a, [{a, [1,2]}, {b, 0}, {a, 3}, {c, -1}, {a, [4]}])
returns:
[1,2,3,4]
Minimizes the representation of all entries in the list. This is
equivalent to
See also
Deletes all entries associated with
Expands particular properties to corresponding sets of
properties (or other terms). For each pair
For example, the following expressions all return
expand([{foo, [bar, baz]}], [fie, foo, fum])
expand([{{foo, true}, [bar, baz]}], [fie, foo, fum])
expand([{{foo, false}, [bar, baz]}], [fie, {foo, false}, fum])
However, no expansion is done in the following call
because
expand([{{foo, true}, [bar, baz]}], [{foo, false}, fie, foo, fum])
Notice that if the original property term is to be preserved in the
result when expanded, it must be included in the expansion list. The
inserted terms are not expanded recursively. If
See also
Similar to
Returns the value of a boolean key/value option. If
See also
Returns an unordered list of the keys used in
Equivalent to
Returns the value of a simple key/value property in
See also
Returns
Returns the first entry associated with
See also
Returns the list of all entries associated with
See also
Passes
For a
For an
The final result is automatically compacted (compare
Typically you want to substitute negations first, then aliases, then perform one or more expansions (sometimes you want to pre-expand particular entries before doing the main expansion). You might want to substitute negations and/or aliases repeatedly, to allow such forms in the right-hand side of aliases and expansion lists.
See also
Creates a normal form (minimal) representation of a property. If
See also
Creates a normal form (minimal) representation of a simple key/value
property. Returns
See also
Partitions
Example:
split([{c, 2}, {e, 1}, a, {c, 3, 4}, d, {b, 5}, b], [a, b, c])
returns:
{[[a], [{b, 5}, b],[{c, 2}, {c, 3, 4}]], [{e, 1}, d]}
Substitutes keys of properties. For each entry in
For example,
See also
Substitutes keys of boolean-valued properties and
simultaneously negates their values. For each entry in
For example,
See also
Unfolds all occurrences of atoms in