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.
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.
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.