Skip to main content

Crate sim_lib_sequence

Crate sim_lib_sequence 

Source
Expand description

Sequence behavior for the SIM runtime: lazy, persistent, runtime-indexed, and transducer-backed collections.

The kernel defines the operation and object contracts; this crate supplies the concrete sequence organ (lazy sequences, persistent vectors/maps/sets, runtime-indexed projection, and transducer pipelines).

Structs§

LazySequence
On-demand sequence object driven by a SequenceProducer.
OrderedSet
Mutable insertion-ordered set with caller-defined key equivalence.
OrderedSetIter
Live iterator over cloned insertion-ordered set members.
OrderedTable
Mutable insertion-ordered table with caller-defined key equivalence.
OrderedTableIter
Live iterator over cloned insertion-ordered table entries.
PersistentSet
Immutable, shareable set object holding canonically distinct elements.
PersistentVector
Immutable, shareable vector object backed by a shared slice.
ProfileSequence
Sequence object that tags an inner sequence with a language profile.
RuntimeIndexLookup
Function-backed RuntimeIndexSource.
SequenceFunction
A callable runtime object exposing one SeqOp.
SequenceLib
The sequence organ lib: installs seq/map|filter|fold as callables.
SparseSequence
Mutable sparse indexed storage with stable holes and bounded allocation.
TransducerPipeline
An ordered chain of TransducerSteps applied per element in one pass.

Enums§

CompactionResult
Result of an explicit ordered-storage compaction request.
SeqOp
One higher-order sequence operation.
SparseSequenceError
A failed sparse-sequence growth or length mutation.
TransducerStep
A single stage of a TransducerPipeline.

Statics§

RECIPES
Cookbook recipes for this lib, embedded at build time.

Traits§

KeyEquivalence
Policy used to decide whether two table or set keys are equivalent.
RuntimeIndexSource
Source of values addressed by contiguous integer keys.

Functions§

filter_sequence
Return a lazy sequence that keeps elements of source passing predicate.
for_each_sequence
Apply visitor to each element of source for its effect.
force_sequence_bounded
Drive a sequence to completion, refusing to exceed max elements.
install_sequence_lib
Installs the sequence organ into cx (idempotent).
lazy_sequence_value
Wrap a SequenceProducer as a runtime sequence Value.
manifest_name
Returns the sim/sequence manifest id under which this lib registers.
map_sequence
Return a lazy sequence that maps each element of source.
persistent_list
Construct an immutable list Value from the given elements.
persistent_list_push
Return a new list with item appended; the input list is unchanged.
persistent_map
Construct an immutable map (table) Value from key/value entries.
persistent_map_assoc
Return a new map with key bound to value; the input map is unchanged.
persistent_set
Construct a PersistentSet as a runtime Value, deduplicating elements.
persistent_set_insert
Return a new set with item inserted if canonically absent; input unchanged.
persistent_vector
Construct a PersistentVector as a runtime Value.
persistent_vector_push
Return a new vector with item appended; the input vector is unchanged.
publish_sequence_organ_claims
Publish the sequence organ and its operation keys into the claim store.
publish_sequence_organ_claims_for_lib
Publish the sequence organ claims as part of a loaded lib receipt.
reduce_sequence
Fold source into a single value with reducer, starting from init.
runtime_index_lookup_sequence
Builds a lazy sequence over contiguous integer keys from a lookup function.
runtime_index_sequence
Builds a lazy sequence over contiguous integer keys starting at first_index.
runtime_index_values
Forces a bounded contiguous integer-key projection into a vector.
sequence_declared_op_keys
All sequence-surface operations this crate models, whether or not they are currently exported as live runtime callables.
sequence_exports
Returns the lib’s exported seq/* functions as kernel Exports.
sequence_filter_op_key
Operation key for sequence filtering.
sequence_for_op_key
Operation key for sequence iteration (for-each).
sequence_for_profile
Tag a sequence Value with a language profile via ProfileSequence.
sequence_from_list_value
Adapt a list Value into a sequence Value.
sequence_lazy_op_key
Operation key for lazy sequence construction.
sequence_live_ops
Live sequence claim-to-export mappings backed by the loaded runtime surface.
sequence_map_op_key
Operation key for sequence mapping.
sequence_op_keys
Operation keys the sequence organ currently publishes as live claims.
sequence_organ_symbol
Symbol naming the sequence organ as a claim subject.
sequence_persistent_op_key
Operation key for persistent sequence construction.
sequence_reduce_op_key
Operation key for sequence reduction.
sequence_transduce_op_key
Operation key for transducer-driven sequence pipelines.
transduce
Stream source through pipeline and fold survivors into a single value.

Type Aliases§

SequenceProducer
Element generator backing a LazySequence.