Quantcast
Channel: Active questions tagged return-value - Stack Overflow
Viewing all articles
Browse latest Browse all 228

How do I do anything with multiple return values in Racket?

$
0
0

It seems that in order to use multiple return values in Racket, I have to either use define-values or collect them into a list with (call-with-values (thunk (values-expr)) list).

In the latter case, why would someone choose to return multiple values instead of a list, if they just have to collect them into a list anyway? Additionally, both of these are very wordy and awkward to work into most code.

I feel like I must be misunderstanding something very basic about multiple-return-values. For that matter, how do I write a procedure accepting multiple return values?


Viewing all articles
Browse latest Browse all 228

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>