wrapping xml closure js
//closure capture that wraps in XML brackets
function wrap(core){
return function(wrapper){
core = "<" + wrapper + ">" + core + "</" + wrapper + ">";
return core;
};
}
/* var a = wrap("foo")
a
=> [Function]
a("h1")
=> '<h1>foo</h1>'
a("h2")
=> '<h2><h1>foo</h1></h2>'
a("p")
=> '<p><h2><h1>foo</h1></h2></p>'
*/