amen zwa, esq.<p>Many <a href="https://mathstodon.xyz/tags/FP" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>FP</span></a> languages compile down to C or LLVM IR and, from thence, down to binary. That is all well and good, but I think there is a simpler, better way: to target the classic <a href="https://mathstodon.xyz/tags/Scheme" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Scheme</span></a> <a href="https://mathstodon.xyz/tags/R4RS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>R4RS</span></a> as the IR, then use a modern optimising Scheme implementation to compile that IR down to binary.</p><p>MacCarthy's <a href="https://mathstodon.xyz/tags/LISP" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>LISP</span></a> was an imperfect, albeit practical, rendition of 𝜆-calculus, which is the ideal IR for FP languages. By extension, a subset of modern Scheme is the perfect IR for FP languages.</p>