3 ms·
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,
by tfgg 12y ago
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?
- orbifold 12y agoNo, 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').
- tfgg 12y agoOk, I think I got the wrong idea that the identity was any arrow pointing back on to an object. Thanks.