Hacker News new | ask | show | jobs
by lsjroberts 3199 days ago
I believe homomorphism is a subset of endomorphism.

So a function that turns an array into another array of different length would be endomorphic (since it maintains the same type), but not homomorphic since it has a different structure (a different set of keys).

1 comments

The other way around. A homomorphism is a structure-preserving map between two arbitrary objects, whereas an endomorphism is a homomorphism where the source and target objects coincide.