john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

composeu

<!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>

  • « switcheroo
  • hmac signature rest client »

Published

Oct 5, 2013

Category

javascript

~44 words

Tags

  • composeu 1
  • javascript 43