Re:One Major Difference Between Clojure and Common Lisp
by dragonwriter on Monday September 14, 2015 @10:10AM
(#10215113)
It's true that it is more difficult to port from Common Lisp or other Lisp-2 dialects to Scheme, Racket, or Clojure (which are Lisp-1 dialects) than it would be to port to other Lisp-2 dialects. But that certainly doesn't make Lisp-1 dialects "not Lisp" while Lisp-2 dialects are "Lisp".
[ Parent
| on HN ]
Re:One Major Difference Between Clojure and Common Lisp
by lispm on Monday September 14, 2015 @11:57AM
(#10215693)
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...