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.

Reply via email to