OwnValues¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
Examples¶
No verified examples yet for this function.
Implementation notes¶
builtin_own_values (1-arg, symbol only) calls symtab_get_own_values(sym) to retrieve the symbol's Rule* list — the immediate x = value assignments — and hands it to the shared rules_to_list helper, which deep-copies each pattern/replacement pair into a Rule[lhs, rhs] node and gathers them into a List. The list is returned unevaluated so the stored values are reported verbatim rather than re-evaluated.
Attributes: HoldAll, Protected.
Implementation status¶
Stable — documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
References¶
- Source:
src/core.c - Specification:
docs/spec/builtins/assignment-and-rules.md
Notes & additional examples¶
Worked examples¶
Notes¶
OwnValues[s] returns the direct value rules created by s = .... An undefined symbol has an empty list; assigning a = 7 stores a single own-value rule.