Hello, fn42
Welcome to fn42.dev — my little corner of the internet, and, if I'm honest, not the first one. I've built and lost this corner more times than I can cleanly count: digital hubs that went up, drifted, broke, or quietly faded while I was busy elsewhere, and that I rebuilt from scratch each time. By my reckoning this is roughly attempt number six. Call it a new chapter of a very old habit.
The name is a tiny manifesto: fn for functional, the paradigm I enjoy the most,
and 42 because, according to The Hitchhiker's Guide to the Galaxy, it is the
answer to life, the universe, and everything.
This site is a hub: notes on programming, experiments, and ideas worth keeping — this time, hopefully, for good.
Functions all the way down
I like code that reads like a description of what, not how. Pure functions compose, and composition scales:
type Fn<A, B> = (a: A) => B;
const compose =
<A, B, C>(g: Fn<B, C>, f: Fn<A, B>): Fn<A, C> =>
(a) =>
g(f(a));
const hello = (s: string) => "Hello " + s;
const world = (s: string) => s + "world!";
const greeting = compose(world, hello)(""); // "Hello world!"Don't panic. And always know where your towel is.