15 static LISP llength(LISP
obj)
20 return(
flocons(obj->storage_as.string.dim));
22 return(
flocons(obj->storage_as.double_array.dim));
24 return(
flocons(obj->storage_as.long_array.dim));
26 return(
flocons(obj->storage_as.lisp_array.dim));
31 if NNULLP(l)
err("improper list to length",obj);
34 err("wrong type of argument to length",obj);}}
43 err(
"improper list to assoc",alist);}
45 LISP
assq(LISP x,LISP alist)
52 err(
"improper list to assq",alist);}
55 {
if NCONSP(cell)
err(
"wrong type of argument to setcar",cell);
56 return(
CAR(cell) = value);}
59 {
if NCONSP(cell)
err(
"wrong type of argument to setcdr",cell);
60 return(
CDR(cell) = value);}
62 LISP
delq(LISP elem,LISP l)
63 {
if NULLP(l)
return(l);
74 static LISP eq(LISP x,LISP y)
77 LISP
eql(LISP x,LISP y)
84 static LISP nullp(LISP x)
122 err(
"wrong type of argument to car",x);}}
131 err(
"wrong type of argument to cdr",x);}}
142 if (atype !=
TYPE(b))
return(
NIL);
165 return((*p->
equal)(a,b));
186 "(assoc KEY A-LIST)\n\ 187 Return pair with KEY in A-LIST or nil.");
190 Return length of LIST, or 0 if LIST is not a list.");
193 Return flatend list (list of all atoms in LIST).");
195 "(assq ITEM ALIST)\n\ 196 Returns pairs from ALIST whose car is ITEM or nil if ITEM is not in ALIST.");
199 Destructively delete ITEM from LIST, returns LIST, if ITEM is not first\n\ 200 in LIST, cdr of LIST otherwise. If ITEM is not in LIST, LIST is\n\ 201 returned unchanged." );
204 Return new list with same members as LIST.");
206 "(cons DATA1 DATA2)\n\ 207 Construct cons pair whose car is DATA1 and cdr is DATA2.");
210 Returns t if DATA is a cons cell, nil otherwise.");
213 Returns car of DATA1. If DATA1 is nil or a symbol, return nil.");
216 Returns cdr of DATA1. If DATA1 is nil or a symbol, return nil.");
218 "(set-car! CONS1 DATA1)\n\ 219 Set car of CONS1 to be DATA1. Returns CONS1. If CONS1 not of type\n\ 220 consp an error is is given. This is a destructive operation.");
222 "(set-cdr! CONS1 DATA1)\n\ 223 Set cdr of CONS1 to be DATA1. Returns CONS1. If CONS1 not of type\n\ 224 consp an error is is given. This is a destructive operation.");
226 "(eq? DATA1 DATA2)\n\ 227 Returns t if DATA1 and DATA2 are the same object.");
229 "(eqv? DATA1 DATA2)\n\ 230 Returns t if DATA1 and DATA2 are the same object or equal numbers.");
233 t if s-expressions A and B are recursively equal, nil otherwise.");
236 Returns t if DATA is nil, nil otherwise.");
239 Returns t if DATA is nil, nil otherwise.");
242 Returns destructively reversed LIST.");
244 "(append LIST1 LIST2)\n\ 245 Returns LIST2 appended to LIST1, LIST1 is distroyed.");
#define INTERRUPT_CHECK()
LISP setcar(LISP cell, LISP value)
LISP siod_flatten(LISP tree)
LISP delq(LISP elem, LISP l)
#define STACK_CHECK(_ptr)
void init_subr_2(const char *name, LISP(*fcn)(LISP, LISP), const char *doc)
#define NEWCELL(_into, _type)
LISP equal(LISP a, LISP b)
LISP assq(LISP x, LISP alist)
LISP cons(LISP x, LISP y)
void err(const char *message, LISP x) EST_NORETURN
LISP(* equal)(LISP, LISP)
LISP setcdr(LISP cell, LISP value)
void init_subr_1(const char *name, LISP(*fcn)(LISP), const char *doc)
LISP append(LISP l1, LISP l2)
void init_subrs_list(void)
LISP assoc(LISP x, LISP alist)
struct user_type_hooks * get_user_type_hooks(long type)