Machine learning technologies play an important role in modern software systems, especially as a complement to platforms capable of supplying abundant training data. However, machine learning is notoriously difficult to work with from a software engineering perspective, compounding existing technical debt with new sources of uncertainty and complexity. Technical debt management is therefore crucial when using machine learning, placing a premium on basic correctness, minimization of accidental complexity, and abstractions about which one can easily reason. Fortunately, functional programming ideas can help us achieve these goals. We will discuss how functional programming design patterns can be applied to machine learning and data processing problems, with examples using Scala and the Scalaz library.