A Map Function for Sass

Sass doesn't have a built in map function for lists and furthermore online searches on the subject will yield you tons of information about Sass maps... and next to nothing about how to make a map function in Sass1.

So here a basic implementation2 I worked out for a simple map function in Sass3:

Since you can't pass functions as parameters in Sass; in my implementation I use call to accomplish the same effect. The downside is that the function name has to be passed to the final map_function quoted.

A map function, given a list and a function name, returns a new list containing the function called against each entry. For primer on what a map function is.. further than this baseline explanation, refer here.