Semigroups, Categories, and Partial Algebras