Type Classes

Type Classes

Share this post

Type Classes
Type Classes
Positive integers and affine traversal

Positive integers and affine traversal

The Positive integer type, why it's helpful for working with rational numbers, and an affine traversal relating Positive to Integer that's great for polymorphic arithmetic.

Chris Martin's avatar
Chris Martin
Jul 22, 2023
∙ Paid
1

Share this post

Type Classes
Type Classes
Positive integers and affine traversal
Share

I do not in general enjoy fussing with numbers. Arithmetic in programming is usually drudgery, a distraction, a problem in need of correction. This article will contain a small amount of math involving numbers (no greater than 10), but the focus will then turn to affine traversals, which I have previously asserted to be a super important idea.

The centrality of AffineTraversal

The centrality of AffineTraversal

Chris Martin
·
June 5, 2023
Read full story

Integer ty…

Keep reading with a 7-day free trial

Subscribe to Type Classes to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Mission Valley Software LLC
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share