class Monorail {
#value;
#size = 1;
constructor(value) {
this.#value = value;
}
bind(f) {
const newThis = f(this.#value);
if (newThis.#size < this.#size + 1) newThis.#size = this.#size + 1;
console.log(`the glaceon is now ${newThis.#size} meters tall`);
return newThis;
}
};