<!DOCTYPE html><html><head><title></title></head><body><pre><script>
function doubl( n ){
return n + n;
}
document.writeln( doubl(3) ); // (3 + 3) * (3 + 3)
function square( n ){
return n * n;
}
document.writeln( square(3) ); // (3 + 3) * (3 + 3)
function composeu( unione, unitwo ){
return function( a ){
return unitwo( unione( a ) );
}
}
document.writeln( composeu(doubl,square)(3) ); // (3 + 3) * (3 + 3)
</script></pre></body></html>