News for hackers. Stuff that matters.
Re:The Algebra of Algebraic data types by wz1000 on Thursday June 25, 2015 @08:36AM (#9777387)
Imagine a collection of a objects(lets call it A) and another collection of b objects(called B). A function is a set of arrows matching each object in A to an object in B. Each object in A only has one arrow originating from it.

For each object in A, you have b ways to draw an arrow to an object in B. As there are a number of objects in A, the total number of arrows you can draw is bbb*b... a times. Hence the number of functions from A -> B is b^a.

There are no comments on this comment yet.