Example 1 — Official t42
Pin 42, then apply identity and add-one.
const t42 = R.applyTo(42);
t42(R.identity); // → 42
t42(R.add(1)); // → 43 How It Works
- Pin.
R.applyTo(42)stores the value. - Identity.
t42(R.identity)returns42unchanged. - Add one.
R.add(1)is a unary function; applied to42→43. - Reuse. Same pinned value, different functions — the thrush pattern.
