const pipe = (fn,...fns) => (...args) => fns.reduce( (acc, f) => f(acc), fn(...args));
const compose = (...fns) => pipe(...fns.reverse());
const map = f => h => (acc, a) => h(acc, f(a))
const filter = f => h => (acc, a) => f(a) ? h(acc, a) : acc
console.log(
    [1,2,3,4,5,6,7,8,9,10]
    .reduce(
        compose(
            map(x => x + 1)
        ,   filter(x => x % 2 == 1)
        )((a, b) => a.concat(b))
    , [])
);