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?
You can use apply
:
(apply func '(1 2 3))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With