Stone-Weierstrass-type theorems for groups of group-valued functions with discrete range or discrete domain are obtained. We study criteria for a subgroup of the group of continuous functions C(X, G) (X compact, G a topological group) to be uniformly dense. These criteria are based on the existence of so-called condensing functions, where a continuous function φ: G → G is said to be condensing (respectively, finitely condensing) if it does not operate on any proper, point separating, closed subgroup of C(K, G), with K compact, (respectively, with K finite) that contains the constant functions. The set DF (G) of finitely condensing functions in C(G, G), is characterized, for any Abelian topological group G, as the set of those functions that are both nonaffine and do not have nontrivial generalized periods (i.e. that do not factorize through nontrivial quotients of G). This provides approximation theorems for functions with discrete domain and arbitrary (topological group) range. ...