2
Copyright (C) 1994 M. Hagiya, W. Schelter, T. Yuasa
4
This file is part of GNU Common Lisp, herein referred to as GCL
6
GCL is free software; you can redistribute it and/or modify it under
7
the terms of the GNU LIBRARY GENERAL PUBLIC LICENSE as published by
8
the Free Software Foundation; either version 2, or (at your option)
11
GCL is distributed in the hope that it will be useful, but WITHOUT
12
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14
License for more details.
16
You should have received a copy of the GNU Library General Public License
17
along with GCL; see the file COPYING. If not, write to the Free Software
18
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
33
Use of VS in mapfunctions:
42
top -> | value | ----- the list which should be returned
44
| : | |-- arguments to FUN.
45
| : | | On call to FUN, vs_base = top+1
46
| argn | --| vs_top = top+n+1
56
object *base = vs_base;
58
int n = vs_top-vs_base-1;
64
for (i = 1; i <= n; i++) {
75
handy = top[0] = MMcons(Cnil,Cnil);
78
super_funcall(base[0]);
79
MMcar(handy) = vs_base[0];
80
for (i = 1; i <= n; i++) {
91
handy = MMcdr(handy) = MMcons(Cnil,Cnil);
99
object *base = vs_base;
101
int n = vs_top-vs_base-1;
107
for (i = 1; i <= n; i++) {
118
handy = top[0] = MMcons(Cnil,Cnil);
121
super_funcall(base[0]);
122
MMcar(handy) = vs_base[0];
123
for (i = 1; i <= n; i++) {
134
handy = MMcdr(handy) = MMcons(Cnil,Cnil);
141
object *top = vs_top;
142
object *base = vs_base;
144
int n = vs_top-vs_base-1;
150
for (i = 1; i <= n; i++) {
162
super_funcall(base[0]);
163
for (i = 1; i <= n; i++) {
180
object *top = vs_top;
181
object *base = vs_base;
183
int n = vs_top-vs_base-1;
189
for (i = 1; i <= n; i++) {
201
super_funcall(base[0]);
202
for (i = 1; i <= n; i++) {
219
object *top = vs_top;
220
object *base = vs_base;
222
int n = vs_top-vs_base-1;
228
for (i = 1; i <= n; i++) {
242
super_funcall(base[0]);
243
if (endp(handy)) handy = top[0] = vs_base[0];
250
MMcdr(handy) = vs_base[0];
252
for (i = 1; i <= n; i++) {
269
object *top = vs_top;
270
object *base = vs_base;
272
int n = vs_top-vs_base-1;
278
for (i = 1; i <= n; i++) {
292
super_funcall(base[0]);
294
handy = top[0] = vs_base[0];
301
MMcdr(handy) = vs_base[0];
303
for (i = 1; i <= n; i++) {
318
gcl_init_mapfun(void)
320
make_function("MAPCAR", Lmapcar);
321
make_function("MAPLIST", Lmaplist);
322
make_function("MAPC", Lmapc);
323
make_function("MAPL", Lmapl);
324
make_function("MAPCAN", Lmapcan);
325
make_function("MAPCON", Lmapcon);