container.js 328 B

12345678910111213141516
  1. class Container {
  2. constructor(x) {
  3. this.$value = x;
  4. }
  5. static of(x) {
  6. return new Container(x);
  7. }
  8. call(f, ...rest) {
  9. return (this.$value = f(this.$value, ...rest)), this;
  10. }
  11. value() {
  12. return this.$value;
  13. }
  14. }
  15. export { Container };
  16. //# sourceMappingURL=container.js.map