Well, that was simpler than expected. (As is usually the case with
Racket.) Thanks, Ben.
On Tue, May 16, 2017 at 5:59 PM, Ben Greenman <benjaminlgreen...@gmail.com>
> Try `(call-with-values func void)`
> On Tue, May 16, 2017 at 5:56 PM, David Storrs <david.sto...@gmail.com>
>> I have a macro that wraps a function call in some debugging information.
>> I would like to discard the results of the function call so that they don't
>> end up printed. This usually works:
>> (void (func))
>> ...but it fails if func uses (values) to return multiple values, since
>> void is variadic but not multiple-return tolerant. I have solved the
>> problem with (the equivalent of) wrapping it in a thunk: ((thunk (func)
>> (void)) but that's clumsy.
>> This is a specific example of the more general question "how could I
>> capture the result of a function call without knowing how many values will
>> come back or if it's normal return / multiple return?"
>> I've been through the docs on multiple return and I don't see a way to
>> handle this. Is there one?
>> You received this message because you are subscribed to the Google Groups
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to racket-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.