Table of Contents

LispCons

from OpenCAD2D.Lisp import LispCons

class LispCons(System.Object) ยท LispCons in the .NET reference

A cons cell, the pair every list is made of: (1 2 3) is a cell holding 1 whose cdr is the cell holding 2, and so on to nil, and (1 . 2) is a cell whose cdr is the number 2. A cell never changes once made, so a list shared by two variables cannot be altered through one of them.

Constructors

__init__

.NET

def __init__(self, car: object, cdr: object) -> None

Makes a cell.

Properties and fields

Car

.NET

@property
def Car(self) -> Any

What the cell holds, the first item of the list.

Cdr

.NET

@property
def Cdr(self) -> Any

The rest of the list: another cell, null at the end, or any value for a dotted pair.