Struct oxischeme::value::Cons
[-]
[+]
[src]
pub struct Cons { // some fields omitted }
A cons cell is a pair of car
and cdr
values. A list is one or more cons
cells, daisy chained together via the cdr
. A list is "proper" if the last
cdr
is Value::EmptyList
, or the scheme value ()
. Otherwise, it is
"improper".
Methods
impl Cons
fn car(&self, heap: &mut Heap) -> RootedValue
Get the car of this cons cell.
fn cdr(&self, heap: &mut Heap) -> RootedValue
Get the cdr of this cons cell.
fn set_car(&mut self, car: &RootedValue)
Set the car of this cons cell.
fn set_cdr(&mut self, cdr: &RootedValue)
Set the cdr of this cons cell.
impl Cons
fn cddr(&self, heap: &mut Heap) -> SchemeResult
fn cdddr(&self, heap: &mut Heap) -> SchemeResult
fn cadr(&self, heap: &mut Heap) -> SchemeResult
fn caddr(&self, heap: &mut Heap) -> SchemeResult
fn cadddr(&self, heap: &mut Heap) -> SchemeResult
Trait Implementations
impl Default for Cons
fn default() -> Cons
Do not use this method, instead allocate cons cells on the heap with
Heap::allocate_cons
and get back a ConsPtr
.