Chain - shindakioku/fpfantasy GitHub Wiki

It's the same with Ap but you can work with List and Map. Also, syntax between Ap and Chain not the same.

chainList | chainMap :: [Data] -> Object(methods: c | result) -> [Data];
var result = chainList(['some', 'String'])
    .c((_) => '${_} END')
    .c((_) => capitalize(_))
    .result();

print(result); // [Some END String END]