Sean Morrison - 2013-05-30

Thank you for the patch, but it has several problems. It does not look like it will even compile, so you should verify that it indeed does. Other problems:
1) first comment has a superfluous extra space on the second line
2) function decl doesn't match our style (return type on separate line)
3) new function should be static
4) mapping is non-descriptive, perhaps make it a verb: mapElements
5) the additional one-liner comments are completely useless
6) the function should take lots of parameters (i.e., it doesn't work)