1283 |
|
|
1284 |
static bool true_or_false; |
static bool true_or_false; |
1285 |
|
|
1286 |
@(defun assoc_or_rassoc_predicate (predicate a_list) |
@(defun assoc_or_rassoc_predicate (predicate a_list &key key) |
1287 |
object endp_temp; |
object endp_temp; |
1288 |
|
object x; |
1289 |
@ |
@ |
1290 |
while (!endp(a_list)) { |
while (!endp(a_list)) { |
1291 |
if ((ifuncall1(predicate, |
if (a_list->c.c_car==Cnil) |
1292 |
(*car_or_cdr)(a_list->c.c_car)) != Cnil) |
continue; |
1293 |
== true_or_false) { |
x=(*car_or_cdr)(a_list->c.c_car); |
1294 |
|
if (key!=Cnil) |
1295 |
|
x=ifuncall1(key,x); |
1296 |
|
if ((ifuncall1(predicate,x) != Cnil) == true_or_false) |
1297 |
@(return `a_list->c.c_car`) |
@(return `a_list->c.c_car`) |
|
} |
|
1298 |
a_list = a_list->c.c_cdr; |
a_list = a_list->c.c_cdr; |
1299 |
} |
} |
1300 |
@(return a_list) |
@(return a_list) |