function randStr(bits = 16) { compose((1 + Math.random()) * 0x10000, Math.floor, int => int.toString(bits), str => str.substring(1) ); }
—
function htmlSpecialChars(string) { return compose(string, s => s.replace(/&/g, "&"), s => s.replace(/"/g, """), s => s.replace(/'/g, "'"), s => s.replace(/</g, "<"), s => s.replace(/>/g, ">") ); }