core: Remove append.
* lib.c (append): Remove. * scaffold/mini-mes.c (append): Remove. * module/mes/base-0.mes (append): New function. * module/mes/read-0.mo: Regenerate. * module/mes/read-0-32.mo: Regenerate.
This commit is contained in:
parent
117006cf7c
commit
05cae56813
8
lib.c
8
lib.c
|
@ -170,14 +170,6 @@ exit_ (SCM x) ///((name . "exit"))
|
|||
exit (VALUE (x));
|
||||
}
|
||||
|
||||
SCM
|
||||
append (SCM x) ///((arity . n))
|
||||
{
|
||||
if (x == cell_nil) return cell_nil;
|
||||
if (cdr (x) == cell_nil) return car (x);
|
||||
return append2 (car (x), append (cdr (x)));
|
||||
}
|
||||
|
||||
//MINI_MES
|
||||
// char const*
|
||||
// string_to_cstring (SCM s)
|
||||
|
|
|
@ -110,6 +110,11 @@
|
|||
(define-macro (include-from-path file)
|
||||
(list 'load (list string-append "module/" file)))
|
||||
|
||||
(define (append . rest)
|
||||
(if (null? rest) '()
|
||||
(if (null? (cdr rest)) (car rest)
|
||||
(append2 (car rest) (apply append (cdr rest))))))
|
||||
|
||||
(include "module/mes/type-0.mes")
|
||||
|
||||
(define (memq x lst)
|
||||
|
@ -129,8 +134,8 @@
|
|||
(define (mes-load-module-env module a)
|
||||
(push! *input-ports* (current-input-port))
|
||||
(set-current-input-port (open-input-file (string-append *mes-prefix* (module->file module))))
|
||||
(let ((x (core:eval (append (cons 'begin (read-input-file-env a))
|
||||
'((current-module)))
|
||||
(let ((x (core:eval (append2 (cons 'begin (read-input-file-env a))
|
||||
'((current-module)))
|
||||
a)))
|
||||
(set-current-input-port (pop! *input-ports*))
|
||||
x))
|
||||
|
|
|
@ -1441,14 +1441,6 @@ exit_ (SCM x) ///((name . "exit"))
|
|||
exit (VALUE (x));
|
||||
}
|
||||
|
||||
SCM
|
||||
append (SCM x) ///((arity . n))
|
||||
{
|
||||
if (x == cell_nil) return cell_nil;
|
||||
if (cdr (x) == cell_nil) return car (x);
|
||||
return append2 (car (x), append (cdr (x)));
|
||||
}
|
||||
|
||||
SCM
|
||||
xassq (SCM x, SCM a) ///for speed in core only
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue