April 19th, 2009

map/reduce

I just actually wrote this and actually used it in my actual compiler:

(map (lambda (body)
       (fold-left replace-operator body uvar* lbl*))
     body*)

fold-left is reduce. You guys, for all my talk, I don't think I've ever actually used this for, you know, fixing an actual bug before. But I actually thought of it and it actually solves exactly the problem that I needed it to solve. I'm blown away.