Jens’ new solution (let (2)
) is, indeed, much faster than the original, e.g. for a let
with 5 variables, as demonstrated below.
I found another quirk regarding run time, also demonstrated below: the library’s original let
block takes more than linear extra runtime for each extra variable!
Edit
Initiallly I had the impression the new let
was like Scheme's let*
, i.e. something like would work. Later I found it doesn't. Or perhaps I’ve been doing something wrong?