Function list_get

Source
pub fn list_get(
    list_pointer: BFieldElement,
    index: usize,
    memory: &HashMap<BFieldElement, BFieldElement>,
    element_size: usize,
) -> Vec<BFieldElement>
Expand description

Read an element from a list.

Only supports lists with statically sized elements.

ยงPanics

Panics if

  • the index is out of bounds, or
  • the element that is to be read resides outside the list`s memory page, or
  • the pointed-to-list is incorrectly encoded into memory.