LeetCodeFunction CompositionFunction CompositionEasySolution type F = (x: number) => number; export function compose(functions: F[]): F { return (x) => functions.reduceRight((acc, func) => func(acc), x); }LeetCodeFunction Compositionhttps://leetcode.com/problems/function-composition