Consider a K-user multiple-access channel. The compute-and-forward framework makes it possible for the receiver to decode one or more linear combinations of the transmitted codewords. Recent efforts have shown that, for the Gaussian multiple-access channel, the compute-and-forward approach is optimal in a certain sense. Specifically, by decoding K independent linear combinations, the receiver can recover the original codewords while operating at the sum capacity. The associated rate tuples differ from the corner points that are attainable via successive cancellation (without rate splitting). In this talk, we propose a compute-and-forward framework for discrete memoryless channels that shares this optimality property.