4 ms·
You don't have to write it all over the codebase. If you have a specific need, defmacro yourself out of your problem. Generally speaking, taking a secondary va
by junke 11y ago
You don't have to write it all over the codebase. If you have a specific need, defmacro yourself out of your problem.
Generally speaking, taking a secondary value alone feels like a bad use of MVR (it happens rarely with standard functions and most libraries).
MVR are not intended to be substitute to other data-structures.
As said elsewhere, you can and should use structs, classes, lists, hash-tables,...
After all, why do we use multiple values instead of a single struct for functions arguments? Because in CL and other languages, unlike in Haskell, you don't want to define an ADT for all your functions or rely on currying.
But if you start putting too many coupled parameters in your functions, it starts to smell fishy.
Extracting a single value is easy, by the way:
(nth-value 1 (foo bar baz))