4

I have a function which takes an unlimited number of args such as (define (func . args)).

Say I have a list '(1 2 3), how do I unpack the elements into the function like (func 1 2 3)? Does Scheme have a primitive for this?

sikerbela
  • 388
  • 1
  • 4
  • 17

1 Answers1

8

You can use apply:

(apply func '(1 2 3))
Gerstmann
  • 5,368
  • 6
  • 37
  • 57