TL;DR: How to define a procedure foobar which can be used as (let-values ((foo bar) (foobar)) ...).
R7RS defines two procedures floor/ and truncate, which computes the quotient and remainder of two numbers divided. I find this really tricky because I can only use these procedures with let-values (or let*-values). A more important issue is that I cannot find a way to define my own procedures that returns multiple values.
Does someone have any ideas?
Note:
- The definitions of
floor/andtruncate/are on the top of page 37 of the report. - I'm not lucky enough to successfully install any R7RS-compliant interpreters or compilers, so I haven't tested any of the above ideas yet. When I had the opportunity I would update this question, if needed.
Did you try
values? The report mentions it on page 53.