brendan
2017-10-9 03:06:11
@brendan has joined the channel
brendan
2017-10-9 03:06:30
Is there a function which turns (values a b c) into (list a b c)?
notjack
2017-10-9 04:39:09
@brendan You can use call-with-values
to do that: (call-with-values (thunk (values a b c)) list)
notjack
2017-10-9 04:39:31
note that the values have to be wrapped in a function that produces them, because you can’t pass multiple values as a single function argument
notjack
2017-10-9 04:40:29
Also, the sugar
package provides a values->list
macro that does exactly what you want: (values->list (values a b c))
=> (list a b c)