Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

lisp

Name: Anonymous 2007-11-27 20:52

How would I do this in lisp?


sub test { return (1, 2, 3) }

my ($a, $b, $c) = test();

Name: Anonymous 2007-11-28 1:30

>>5 (with vars (a b c) = test do ....)
?
In what Lisp?

(defun test (values 1 2 3))
(multiple-value-bind (a b c) (test))

or

(define test (lambda () (values 1 2 3)))
(call-with-values (test) (lambda (a b c)))

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List