  A semigroupoid is a set equipped with a partially defined associative
operation. Given a semigroupoid \Lambda we construct a C*-algebra C*(\Lambda)
from it. We then present two main examples of semigroupoids, namely the Markov
semigroupoid associated to an infinite 0-1 matrix, and the semigroupoid
associated to a row-finite higher-rank graph without sources. In both cases the
semigroupoid C*-algebra is shown to be isomorphic to the algebras usually
attached to the corresponding combinatorial object, namely the Cuntz-Krieger
algebras and the higher-rank graph C*-algebras, respectively. In the case of a
higher-rank graph (\Lambda,d), it follows that the dimension function d is
superfluous for defining the corresponding C*-algebra.
