@Patrick OK, this question fits better to softwareengineering.stackexchange.com. I deleted my answer so you might want to delete it. However, I think that the answer given at softwareengineering isn't particularly helpful. Functional programming is narrowed to monads there. —
ftor 25 secs ago