const compose = (g, f) => a => g(f(a)) const f = a => a % 2 == 0 const g = b => b ? "True" : "False" const composed = compose(g, f) console.assert(composed(2) === "True") console.assert(composed(3) === "False")