Browse files

stop recursive loop with outputing a list of null

  • Loading branch information...
1 parent d85f5b5 commit 77e6da781e1d8fd4cd9ed7034c8630ce5ac8bf2d @vii committed Mar 11, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/ml/object-to-ml.lisp
View
5 src/ml/object-to-ml.lisp
@@ -6,8 +6,9 @@
(defgeneric object-to-ml (object))
(defmethod object-to-ml ((list list))
- (with-ml-output
- (loop for i in list do (output-object-to-ml i))))
+ (when list
+ (with-ml-output
+ (loop for i in list do (output-object-to-ml i)))))
(defmethod object-to-ml ((f function))
(object-to-ml (funcall f)))

0 comments on commit 77e6da7

Please sign in to comment.