From 68d53c01b0b8e9a007a6a30158c19e34b2d2a34e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= 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 may specify options
+ such as options passed to a function where a user can specify options
overriding the default settings, object properties, annotations,
- etc. Two keys are considered equal if they match (
Two keys are considered equal if they match (
Similar to
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:
See also
+
Expands particular properties to corresponding sets of
- properties (or other terms). For each pair
For example, the following expressions all return
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:
+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])
- because
Note that if the original property term is to be preserved in the +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:
See also
+
Similar to
See also:
Similar to
+
Returns the value of a boolean key/value option. If
-
See also:
See also
+
Returns an unordered list of the keys used in
Returns an unordered list of the keys used in
+
Equivalent to
Equivalent to
+
Returns the value of a simple key/value property in
-
See also:
See also
+
Returns
See also:
See also
+
Returns the list of all entries 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:
See also
Creates a normal form (minimal) representation of a property. If
-
See also:
See also
+
Creates a normal form (minimal) representation of a simple
- key/value property. Returns
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]}
+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
-
Example:
For example,
See also:
See also
+
Substitutes keys of boolean-valued properties and
simultaneously negates their values. For each entry in
-
Example:
For example,
See also:
See also
+
Unfolds all occurrences of atoms in
Unfolds all occurrences of atoms in