'use strict';

var compose = require('./');

var Promise = require('any-promise');

function addOne(n) {

return n + 1;

}

function timesTwo(n) {

return n * 2;

}

function addOneAsync(n) {

return Promise.resolve(n + 1);

}

function timesTwoAsync(n) {

return Promise.resolve(n * 2);

}

// 创建函数组合数组:

var functions = [

compose(

addOne,

timesTwo

),

compose(

addOneAsync,

timesTwo

),

compose(

addOne,

timesTwoAsync

),

compose(

addOneAsync,

timesTwoAsync

)

];