compose function

dynamic Function(dynamic x) compose(
  1. List<Function> fns
)

Implementation

Function(dynamic x) compose(List<Function> fns) => (x) {
      var _x = x;
      final _reversed = fns.reversed.toList();
      for (Function fn in _reversed) {
        _x = fn(_x);
      }
      return _x;
    };