R
R
RokkerRuslan2014-02-23 10:48:58
Lisp
RokkerRuslan, 2014-02-23 10:48:58

How to implement packing/unpacking of lists in lisp/scheme?

Good afternoon! I know that in scheme it is possible to pack all the passed function arguments into a list:

(define (function . items) (some-computation items))
(function 1 2 3 4)

Is it possible to unpack the list?
Usage example:
(define items (list 1 2 3 4))
(function <синтаксический элемент> items)

PS This usage is not allowed:
(function . items)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question