metamon/transform/list

Standard Transform(List(a)) constructors used in metamorphic relations. Each transform is named and deterministic.

Values

pub fn append(value: a) -> transform.Transform(List(a))

Append value to the list.

pub fn dedupe() -> transform.Transform(List(a))

Drop duplicates, keeping the first occurrence of each element.

pub fn prepend(value: a) -> transform.Transform(List(a))

Prepend value to the list.

pub fn reverse() -> transform.Transform(List(a))

Reverse the list.

pub fn shuffle(seed_value: Int) -> transform.Transform(List(a))

A deterministic shuffle parametrised by a seed integer. The same integer always produces the same permutation. Implemented as a stable sort by random keys (Knuth’s “decorate, sort, undecorate” pattern).

Search Document