type FlowFunction
= (param: P) => P; /** * 类似 lodash.flow 的方法 * @param flows */ export function flow
(...flows: FlowFunction
[]): FlowFunction
{ return (param: P) => { return flows.reduce((result: P, f: FlowFunction
) => { return f(result); }, param); }; }