# Factoring through objects: subtyping, Unit, Void, Product, Sum

**URL:** https://discourse.haskell.org/t/factoring-through-objects-subtyping-unit-void-product-sum/13936
**Category:** Links
**Created:** [April 15, 2026, 5:50pm UTC](https://discourse.haskell.org/t/factoring-through-objects-subtyping-unit-void-product-sum/13936 "2026-04-15T17:50:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![iokasimov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/iokasimov/32/5591_2.png) [@iokasimov](https://discourse.haskell.org/u/iokasimov)
#### Post date: [April 15, 2026, 5:50pm UTC](https://discourse.haskell.org/t/factoring-through-objects-subtyping-unit-void-product-sum/13936/1 "2026-04-15T17:50:22Z")

</div>

This is an article I wanted to write for some time, it’s mostly a showcase of using the idea of “factoring through” from abstract algebra with examples. It’s useful for turning regular functions into constants and coconstants, implementing case splitting and building tuples.

 ![ภาพถ่ายหน้าจอ 2569-04-13 เวลา 21.08.26](https://us1.discourse-cdn.com/flex002/uploads/haskell/original/2X/d/dda14169f1fa06ae02f9fc4ef8516183e4af2ee8.png)

[https://muratkasimov.art/Ya/Articles/Factoring-through-objects/](https://muratkasimov.art/Ya/Articles/Factoring-through-objects/)
