News for hackers. Stuff that matters.
Re:Category theory for beginners by tfgg on Tuesday February 24, 2015 @10:13AM (#9100948)
So, on slide 33, the "+1" and "bestFriend" arrows are identities of Int and Person? On slide 35 it says that identity is associated with the identity function, but to me that means a function that returns what you give it, rather than "+1", which gives you the next number. So the identity of Person just means any function with the type signature Person->Person?
Re:Category theory for beginners by orbifold on Tuesday February 24, 2015 @10:25AM (#9101037)
No, the identity id:A->A is characterized by the property that for all arrows

f:B->A and g:A->C

(P1) id . f = f and (P2) g . id = g, in particular it is unique, since if id':A->A had the same property, then

id' = id . id' = id,

where the first equality follows by (P1) and the second by (P2').

Re:Category theory for beginners by tfgg on Tuesday February 24, 2015 @10:30AM (#9101074)
Ok, I think I got the wrong idea that the identity was any arrow pointing back on to an object. Thanks.