Hacker News new | ask | show | jobs
by CraigJPerry 767 days ago
Product types are one kind of algebraic data type, only 5 languages from that TIOBE page don’t have them so most common langs have ADTs
1 comments

When you have natural numbers and a multiplication operation (product) would you say that those form an algebra? (ADT means algebraic data type)
You’ve got both a carrier (the set of natural numbers) and a morphism (product operation) so yeah you have an algebra.