News for hackers. Stuff that matters.
Re:The algebra and calculus of algebraic data types by contravariant on Saturday September 08, 2018 @07:20PM (#17943359)
In mathematics, assuming 'void' is the empty set, the function void -> a exists, but is kind of trivial because it never returns anything, however functions a -> void can't exist because they'd have to return an element of void, which don't exist, the one exception being the function void -> void. Denoting A -> B as B^A this translates to:

    a^0 = 1  
    0^a = 0  
    0^0 = 1
The fact that there's precisely 1 function void -> a is considered rather special in category theory, and means that 'void' is the so called 'initial object' for the category (which is automatically unique up to isomorphism).
Re:The algebra and calculus of algebraic data types by Sharlin on Saturday September 08, 2018 @07:26PM (#17943378)
Yeah, it makes sense now. Thanks.