Can you point me to a paper from the 70s that explains how to flatten such calls? The best that I know is "stream fusion, to completeness" which was published in something like 2019!
"Lisp on Small Pieces" from 1994
https://www.amazon.com/exec/obidos/ASIN/0521562473/acmorg-20
It is not 70's, but 26 years should be enough to get hold of such knowledge.
Or "Modern Compiler Implementation" from 1998, a little more young.
https://www.cs.princeton.edu/~appel/modern/
Or rather "The Implementation of Functional Programming Languages", from 1986, now getting closer to 70's.
https://www.microsoft.com/en-us/research/publication/the-imp...
I can still have a look into my SIGPLAN paper collection to dust off some ML papers.