Generalized codesamples