= Occurrence-position representation of a sequence
{title2=$\operatorname{rep}(xs)(v)=\{i:xs_i=v\}$}
= Occurrence-position representations of a sequence
{synonym}
Represent a <sequence> by a <function> mapping each value to its increasing <list> of occurrence positions. On finite inputs, querying a value produces every matching index and a terminating tail. On infinite inputs, absence of further occurrences may be uncomputable by a generic scan, as expressed by the <absence-detection obstruction for infinite lists>. Parity filtering and index rescaling represent alternate-element subsequences, but may fail to preserve <productivity>.
Back to article page