PositionIndex¶
Status: Stable
documented, exercised by the test suite and/or worked examples, with no known limitations recorded.
Description¶
PositionIndex[list]
Gives \<|value -> {positions}|> mapping each distinct element to the list of 1-based positions where it occurs. O(n).
Examples (1)¶
Every input below was run against the current Mathilda build and its output recorded.
Basic examples (1)¶
Implementation notes¶
Attributes: Protected.
References¶
- Source:
src/assoc.c - Specification:
docs/spec/builtins/data-structures.md - Tests:
tests/test_association.c