// compose : (A → B) -> (B → C) -> (A → C)
const compose = (f: Function, g: Function) => (x) => g(f(x))
it('(g ∘ f)(a) = g(f(a)) where a ∈ A', () => {
const a: A = new A('s') // a ∈ A
const actual = compose(f, g)(a) // (g ∘ f)(a)
const expected = g(f(a)) // g(f(a))
expect(actual).to.deep.equal(expected)
expect(actual instanceof C).to.be.true // c ∈ C
expect(expected instanceof C).to.be.true // c ∈ C
})