the monorail monad. every time you bind it logs that the shiny glaceon has gotten a little big larger
javascript Show more
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; }};
re: javascript Show more
@aescling using oop in javascript 🤮
@wallhackio .bind chaining
.bind
@aescling makes it better, but still not good enough
@wallhackio we are watching a movie
@aescling but it's the sonic movie
@wallhackio fair
A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.
re: javascript
@aescling makes it better, but still not good enough