Notice that the html5_required function returns the field passed to it. Notice also that that each Django field is callable, as are all classes with __init__ methods. We can therefore use a technique, called function composition and common in languages such as Haskell, to combine them.

Neither Python nor its standard library provides a canonical way to compose functions, so we make one: