Skip to content

Draft entry 7: Replace inheritance with natural transformation - #17

Open
kryptt wants to merge 1 commit into
masterfrom
refactoring/replace-inheritance-with-natural-transformation
Open

kryptt wants to merge 1 commit into
masterfrom
refactoring/replace-inheritance-with-natural-transformation

Conversation

@kryptt

@kryptt kryptt commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Page, three Before/After example pairs (Scala 3 + Haskell), hedgehog specs (equivalence + naturality square per example), koan and example diagrams, catalogue slug and Jekyll exclude.

Examples escalate by what the arrow preserves:
01 stack-vector - iso: Stack/List wrapper, toList/fromList
02 dictionary-set - invariant: Map -> Set[(K,V)] via entries
03 either-option - forgetful: Either -> Option via toOption
(Before is a Result class that is-a both views; quantity
returns Option[Int] / Maybe Int)

Includes review round 1: histories build oldest-first so replay needs no reverse; intro and The move condensed to one paragraph; inverse legitimized where the is-a holds strictly.

NOT YET VERIFIED: no scala-cli, GHC/Docker or Ruby on the drafting machine; run run.sh, mutation checks and the Jekyll build before PR.

Page, three Before/After example pairs (Scala 3 + Haskell), hedgehog
specs (equivalence + naturality square per example), koan and example
diagrams, catalogue slug and Jekyll exclude.

Examples escalate by what the arrow preserves:
  01 stack-vector    - iso: Stack/List wrapper, toList/fromList
  02 dictionary-set  - invariant: Map -> Set[(K,V)] via entries
  03 either-option   - forgetful: Either -> Option via toOption
     (Before is a Result class that is-a both views; quantity
      returns Option[Int] / Maybe Int)

Includes review round 1: histories build oldest-first so replay
needs no reverse; intro and The move condensed to one paragraph;
inverse legitimized where the is-a holds strictly.

NOT YET VERIFIED: no scala-cli, GHC/Docker or Ruby on the drafting
machine; run run.sh, mutation checks and the Jekyll build before PR.
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://www.constructive.dev/pr-preview/pr-17/

Built to branch gh-pages at 2026-09-11 21:47 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant