What's wrong with my labels?
PS[19]> (ps (defun fac (n) (labels ((f (n a) (if (< n 2) a (f (- n 1) (* n a))))) (f n 1))) )
*** - The object to be destructured should be a list with 0 elements, not ((- N 1) (* N A)). The following restarts are available: ABORT :R1 Abort main loop Break 1 PS[20]>
That form works for me in SBCL. What Lisp are you using?
On Wed, Oct 27, 2010 at 3:08 PM, Dmitri Pavlenkov <dmitripavlenkov@gmail.com
wrote:
What's wrong with my labels?
PS[19]> (ps (defun fac (n) (labels ((f (n a) (if (< n 2) a (f (- n 1) (* n a))))) (f n 1))) )
*** - The object to be destructured should be a list with 0 elements, not ((- N 1) (* N A)). The following restarts are available: ABORT :R1 Abort main loop Break 1 PS[20]>
parenscript-devel mailing list parenscript-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
Clisp. The form works without ps.
On Wed, Oct 27, 2010 at 5:14 PM, Daniel Gackle danielgackle@gmail.comwrote:
That form works for me in SBCL. What Lisp are you using?
On Wed, Oct 27, 2010 at 3:08 PM, Dmitri Pavlenkov < dmitripavlenkov@gmail.com> wrote:
What's wrong with my labels?
PS[19]> (ps (defun fac (n) (labels ((f (n a) (if (< n 2) a (f (- n 1) (* n a))))) (f n 1))) )
*** - The object to be destructured should be a list with 0 elements, not ((- N 1) (* N A)). The following restarts are available: ABORT :R1 Abort main loop Break 1 PS[20]>
parenscript-devel mailing list parenscript-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
parenscript-devel mailing list parenscript-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
This is a bug in PS 2.1. It's fixed in 2.2, but that hasn't made it to Quicklisp yet.
Vladimir
2010/10/27 Dmitri Pavlenkov dmitripavlenkov@gmail.com:
What's wrong with my labels?
PS[19]> (ps (defun fac (n) (labels ((f (n a) (if (< n 2) a (f (- n 1) (* n a))))) (f n 1))) )
*** - The object to be destructured should be a list with 0 elements, not ((- N 1) (* N A)). The following restarts are available: ABORT :R1 Abort main loop Break 1 PS[20]>
parenscript-devel mailing list parenscript-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
parenscript-devel@common-lisp.net