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”?




\operatorname{func}will indeed add a thin space when the string is followed by another similar object, but not before an open parenthesis. Would you please add some examples to your question? And maybe some reference for us to look at. – egreg Sep 14 '11 at 8:49