JSFiddle - React, Tailwind, and code Playground

by shapeshifta

JavaScript

var compose = function(f,g) {
  return function(x) {
    return f(g(x));
  };
};

var toUpperCase = function(x) { return x.toUpperCase(); };
var exclaim = function(x) { return x + '!'; };
var shout = compose(exclaim, toUpperCase);

var jo = shout("send in the clowns");

console.log(jo);