Fact.immutable constructor

Fact.immutable(
  1. String relation,
  2. List<Object> values
)

Creates a Fact with an unmodifiable copy of the values list.

Use this factory when creating facts at runtime to ensure the fact cannot be mutated after creation.

Implementation

factory Fact.immutable(String relation, List<Object> values) =>
    Fact(relation, List.unmodifiable(values));