sigildocs

(scheme cxr)

(scheme cxr) - R7RS CXR Library

Extended car/cdr accessor procedures for nested pair structures. Provides all compositions of car and cdr from three to four levels deep (e.g., caaddr, cddddr).

For basic two-level accessors (caar, cadr, cdar, cddr), use (scheme base) or the prelude.

See: R7RS Small §6.4

Exports

caadrprocedure

Get (car (car (cdr x))).

Re-exported from (sigil core)

cadarprocedure

Get (car (cdr (car x))) - useful for alist value access.

Re-exported from (sigil core)

caddrprocedure

Get the third element: (car (cdr (cdr x))).

(caddr '(1 2 3 4))  ; => 3

Re-exported from (sigil core)

cdadrprocedure

Get (cdr (car (cdr x))).

Re-exported from (sigil core)

cdddrprocedure

Get the tail after third element: (cdr (cdr (cdr x))).

(cdddr '(1 2 3 4 5))  ; => (4 5)

Re-exported from (sigil core)

cadddrprocedure

Get the fourth element: (car (cdr (cdr (cdr x)))).

(cadddr '(1 2 3 4 5))  ; => 4

Re-exported from (sigil core)