In some cases, it is useful to call a procedure with guaranteed left-to-right evaluation order. For example, when calling a record constructor with data read from a port, order matters. Often the fields are in the same order as in the file, so no reshuffling is required. Therefore, the usual approach of introducing names and ordering via let*
is a bit burdensome.
Is there some ready-made syntax in the standard library that provides this functionality? Basically, instead of (f a b c)
, I expected to write something like (ordered f a b c)
, which is translated into
(let* ((t0 f)
(t1 a)
(t2 b)
(t3 c))
(t0 t1 t2 t3))
with new symbols t0
to t3
.