Cons cell
ConceptA cons cell is a two-field heap-allocated data structure used in the ImpL imperative language to build linked lists and other pointer-based structures; it has a head field and a tail field, and is created and accessed by the new cons, head, and tail operations within ImpL programs.
WIKI
Cons cell
Overview
In the ImpL imperative language, a cons cell is the fundamental two-field heap-allocated data structure from which linked lists and other pointer-based data structures are composed. Each cons cell has a head field and a tail field. Values held in these fields may be integers, the null reference nil, or pointers (ptr(r)) to other cons cells, which allows cons cells to be linked into nil-terminated or even cyclic lists (chunk 24a78dfe-f23e-4622-a271-5b5d41f78400; chunk 10f11341-f17f-440e-8eca-3070f887cf19).
Construction and access in ImpL
The grammar of ImpL provides three primitives that operate on cons cells (chunk 24a78dfe-f23e-4622-a271-5b5d41f78400):
NEIGHBORHOOD
No graph connections found for this entity yet. It may appear in future ingestion runs.
explore full graph →