2 ms·
Porting code from Lisp-2 to Lisp-1 is not that difficult. Example: Lisp-2: (defun new-map (f l) (dolist (e l) (funcall f e))) Lisp-1:
by lispm 11y ago
Porting code from Lisp-2 to Lisp-1 is not that difficult.
Example:
Lisp-2:
(defun new-map (f l)
(dolist (e l)
(funcall f e)))
Lisp-1:
(defun new-map (f l)
(dolist (e l)
(f e)))
Another example:
Lisp-2
(defun foo (l)
(flet ((new-map (f l)
(dolist (e l)
(f e))))
(new-map (function sin) l)))
Lisp-1
(defun foo (l)
(let ((new-map (lambda (f l)
(dolist (e l)
(f e)))))
(new-map sin l)))
To make it easier, just define FUNCALL, FUNCTION and FLET in Lisp-1...