2.12 Conses

2.12.1 C Reference

2.12.1.1 Accessors

Accessing the elements of conses

Functions

Function: cl_object ECL_CONS_CAR (cl_object o)
Function: cl_object ECL_CONS_CDR (cl_object o)
Function: cl_object ECL_RPLACA (cl_object o, cl_object v)
Function: cl_object ECL_RPLACD (cl_object o, cl_object v)
Function: cl_object _ecl_car (cl_object o)
Function: cl_object _ecl_cdr (cl_object o)
Function: cl_object _ecl_caar (cl_object o)
Function: cl_object _ecl_cadr (cl_object o)

...

Description

These functions access the elements of objects of type cons (ECL_CONS_CAR, ECL_CONS_CDR, ECL_RPLACA and ECL_RPLACD) or type list (_ecl_car, _ecl_cdr, _ecl_caar, ...). They don’t check the type of their arguments.

2.12.1.2 ANSI Dictionary

Common Lisp and C equivalence

Lisp symbolC function
conscl_object cl_cons(cl_object car, cl_object cdr)
conspcl_object cl_consp(cl_object object)
atomcl_object cl_atom(cl_object object)
rplacacl_object cl_rplaca(cl_object cons, cl_object car)
rplacdcl_object cl_rplacd(cl_object cons, cl_object cdr)
carcl_object cl_car(cl_object cons)
cdrcl_object cl_cdr(cl_object cons)
caarcl_object cl_caar(cl_object cons)
cdarcl_object cl_cdar(cl_object cons)
cadrcl_object cl_cadr(cl_object cons)
cddrcl_object cl_cddr(cl_object cons)
caaarcl_object cl_caaar(cl_object cons)
cdaarcl_object cl_cdaar(cl_object cons)
cadarcl_object cl_cadar(cl_object cons)
cddarcl_object cl_cddar(cl_object cons)
caadrcl_object cl_caadr(cl_object cons)
cdadrcl_object cl_cdadr(cl_object cons)
caddrcl_object cl_caddr(cl_object cons)
cdddrcl_object cl_cdddr(cl_object cons)
caaaarcl_object cl_caaaar(cl_object cons)
cdaaarcl_object cl_cdaaar(cl_object cons)
cadaarcl_object cl_cadaar(cl_object cons)
cddaarcl_object cl_cddaar(cl_object cons)
caadarcl_object cl_caadar(cl_object cons)
cdadarcl_object cl_cdadar(cl_object cons)
caddarcl_object cl_caddar(cl_object cons)
cdddarcl_object cl_cdddar(cl_object cons)
caaadrcl_object cl_caaadr(cl_object cons)
cdaadrcl_object cl_cdaadr(cl_object cons)
cadadrcl_object cl_cadadr(cl_object cons)
cddadrcl_object cl_cddadr(cl_object cons)
caaddrcl_object cl_caaddr(cl_object cons)
cdaddrcl_object cl_cdaddr(cl_object cons)
cadddrcl_object cl_cadddr(cl_object cons)
cddddrcl_object cl_cddddr(cl_object cons)
copy-treecl_object cl_copy_tree(cl_object tree)
subliscl_object cl_sublis(cl_narg narg, cl_object alist, cl_object tree, ...)
nsubliscl_object cl_sublis(cl_narg narg, cl_object alist, cl_object tree, ...)
substcl_object cl_subst(cl_narg narg, cl_object new, cl_object old, cl_object tree, ...)
subst-ifcl_object cl_subst_if(cl_narg narg, cl_object new, cl_object predicate, cl_object tree, ...)
subst-if-notcl_object cl_subst_if_not(cl_narg narg, cl_object new, cl_object predicate, cl_object tree, ...)
nsubstcl_object cl_nsubst(cl_narg narg, cl_object new, cl_object old, cl_object tree, ...)
nsubst-ifcl_object cl_nsubst_if(cl_narg narg, cl_object new, cl_object predicate, cl_object tree, ...)
nsubst-if-notcl_object cl_nsubst_if_not(cl_narg narg, cl_object new, cl_object predicate, cl_object tree, ...)
tree-equalcl_object cl_tree_equal(cl_narg narg, cl_object tree1, cl_object tree2, ...)
copy-listcl_object cl_copy_list(cl_object list)
listcl_object cl_list(cl_narg narg, ...)
list*cl_object cl_listX(cl_narg narg, ...)
list-lengthcl_object cl_list_length(cl_object list)
listpcl_object cl_listp(cl_object object)
make-listcl_object cl_make_list(cl_narg narg, cl_object size, ...)
firstcl_object cl_first(cl_object list)
secondcl_object cl_second(cl_object list)
thirdcl_object cl_third(cl_object list)
fourthcl_object cl_fourth(cl_object list)
fifthcl_object cl_fifth(cl_object list)
sixthcl_object cl_sixth(cl_object list)
seventhcl_object cl_seventh(cl_object list)
eighthcl_object cl_eighth(cl_object list)
ninthcl_object cl_ninth(cl_object list)
tenthcl_object cl_tenth(cl_object list)
nthcl_object cl_nth(cl_object n, cl_object list)
endpcl_object cl_endp(cl_object list)
nullcl_object cl_null(cl_object object)
nconccl_object cl_nconc(cl_narg narg, ...)
appendcl_object cl_append(cl_narg narg, ...)
revappendcl_object cl_revappend(cl_object list, cl_object tail)
nreconccl_object cl_nreconc(cl_object list, cl_object tail)
butlastcl_object cl_butlast(cl_narg narg, cl_object list, ...)
nbutlastcl_object cl_nbutlast(cl_narg narg, cl_object list, ...)
lastcl_object cl_last(cl_narg narg, cl_object list, ...)
ldiffcl_object cl_ldiff(cl_object list, cl_object object)
tailpcl_object cl_tailp(cl_object object, cl_object list)
nthcdrcl_object cl_nthcdr(cl_object n, cl_object list)
restcl_object cl_rest(cl_object list)
membercl_object cl_member(cl_narg narg, cl_object member, cl_object list, ....)
member-ifcl_object cl_member_if(cl_narg narg, cl_object predicate, cl_object list, ....)
member-if-notcl_object cl_member_if_not(cl_narg narg, cl_object predicate, cl_object list, ....)
mapccl_object cl_mapc(cl_narg narg, cl_object function, ...)
mapcarcl_object cl_mapcar(cl_narg narg, cl_object function, ...)
mapcancl_object cl_mapcan(cl_narg narg, cl_object function, ...)
maplcl_object cl_mapl(cl_narg narg, cl_object function, ...)
maplistcl_object cl_maplist(cl_narg narg, cl_object function, ...)
mapconcl_object cl_mapcon(cl_narg narg, cl_object function, ...)
aconscl_object cl_acons(cl_object key, cl_object datum, cl_object alist)
assoccl_object cl_assoc(cl_narg narg, cl_object item, cl_object alist, ...)
assoc-ifcl_object cl_assoc_if(cl_narg narg, cl_object predicate, cl_object alist, ...)
assoc-if-notcl_object cl_assoc_if_not(cl_narg narg, cl_object predicate, cl_object alist, ...)
copy-alistcl_object cl_copy_alist(cl_object alist)
pairliscl_object cl_pairlis(cl_narg narg, cl_object keys, cl_object data, ...)
rassoccl_object cl_rassoc(cl_narg narg, cl_object item, cl_object alist, ...)
rassoc-ifcl_object cl_rassoc_if(cl_narg narg, cl_object predicate, cl_object alist, ...)
rassoc-if-notcl_object cl_rassoc_if_not(cl_narg narg, cl_object predicate, cl_object alist, ...)
get-propertiescl_object cl_get_properties(cl_object plist, cl_object indicator_list)
getfcl_object cl_getf(cl_narg narg, cl_object plist, cl_object indicator, ...)
intersectioncl_object cl_intersection(cl_narg narg, cl_object list1, cl_object list2, ...)
nintersectioncl_object cl_nintersection(cl_narg narg, cl_object list1, cl_object list2, ...)
adjoincl_object cl_adjoin(cl_narg narg, cl_object item, cl_object list, ...)
set-differencecl_object cl_set_difference(cl_narg narg, cl_object list1, cl_object list2, ...)
nset-differencecl_object cl_nset_difference(cl_narg narg, cl_object list1, cl_object list2, ...)
set-exclusive-orcl_object cl_set_exclusive_or(cl_narg narg, cl_object list1, cl_object list2, ...)
nset-exclusive-orcl_object cl_nset_exclusive_or(cl_narg narg, cl_object list1, cl_object list2, ...)
subsetpcl_object cl_subsetp(cl_narg narg, cl_object list1, cl_object list2, ...)
unioncl_object cl_union(cl_narg narg, cl_object list1, cl_object list2, ...)
nunioncl_object cl_nunion(cl_narg narg, cl_object list1, cl_object list2, ...)