(next: (x: string) => string)
| 12 | |
| 13 | it('composes functions from right to left', () => { |
| 14 | const a = (next: (x: string) => string) => (x: string) => next(x + 'a') |
| 15 | const b = (next: (x: string) => string) => (x: string) => next(x + 'b') |
| 16 | const c = (next: (x: string) => string) => (x: string) => next(x + 'c') |
| 17 | const final = (x: string) => x |