First, I am new to TeX and use it only for mathematical expressions. IMHO the most striking feature is that TeX does not respect whitespaces.
In lambda calculus, application is denoted by juxtaposition. In programming languages based on lambda calculus (ML, Haskell) names may be several letters long, therefore, to separate names in application, a whitespace is placed between names. I want to use function names from standard libraries of those programming languages, therefore I can not just give up multiletter names. Currently I use “\ ” in application, but it seems hackish to me and clutters the code. What is the best way to do this? Example: You can take just any functional code, like
$foldr\ f\ z\ (x:xs) = f\ x\ (foldr\ f\ z\ xs)$.
BTW, is it regular in lambda calculus to embrace multiletter names in “operatorname”?