以下对 compose 函数的 Hindley-Milner 类型签名的尝试是否正确?
// compose :: (f -> [f]) -> (f -> f -> f) -> [f] -> f
const compose = (...fns) => fns.reduce((f,g) => (...args) => f(g(...args)));
以下对 compose 函数的 Hindley-Milner 类型签名的尝试是否正确?
// compose :: (f -> [f]) -> (f -> f -> f) -> [f] -> f
const compose = (...fns) => fns.reduce((f,g) => (...args) => f(g(...args)));