Domain-specific languages become effective only in the presence of convenient lightweight tools for defining, implementing, and optimizing new languages. Functional programming provides a promising framework for such tasks; FP and DSLs are natural partners. In these lectures we will discuss FP techniques for DSLs—especially standalone versus embedded DSLs, and shallow versus deep embeddings.