To my surprise, mapcar is so fast (it's an elisp primitive) that creating lambdas is cheaper than using a loop: https://gist.github.com/Wilfred/d51db0a1433ec4abdbca58a0dec039a5