export type Step = (val: T) => T; export const compose = (pipeline: Step[], value: T) => pipeline.reduce((acc, curr) => curr(acc), value);