Languages with first-class functions have function types like "a function expecting a Cat and returning an Animal" (written in OCaml syntax or in C# syntax).
When dealing with functions that take functions as arguments, this rule can be applied several times.