Functional Programming, Haskell, Computer Science, Lambda Calculus, Algorithms.
the same time and, thus, isn’t allowed. Here is a quick solution: let’s only allow variables to occur once. This allows two optimizations: first, the λ can keep a pointer to the occurrence of its variable, so, there’s no need for a traversal. Second, since the variable only occurs once, we can