DEV Community

Discussion on: Solving Problems By Avoiding Them

Collapse
 
deciduously profile image
Ben Lovy

It IS fun! It's been my favorite Rust project to date. I highly recommend both the book as-is and the exercise of translating it.

You're correct, this is coming from the book. My end goal is an equivalent interpreter to that found in the book, and the Lisp the author describes is indeed idiosyncratic.

As it turns out, variadic functions are the very next thing on the list, but employing a syntax like {x & xs}, using xs to collect any trailing arguments. Then we can define curry: fun {unpack f xs} {eval (join (list f) xs)} and uncurry: fun {pack f & xs} {f xs}.