I'm thinking these familiar concepts of
LET* in the context of Lambda Calculus (LC).
LET is an abbreviation for this LC expression:
(LET a 1 b 2 e) = (λ a . (λ b . e) 1 2)
LET* is an abbreviation for this LC expression:
(LET* a 1 b 2 e) = (λ a . (λ b . e 2) 1)
e is the body of the function.
LET* just enables to use former variable inside latter variable in the following way:
(LET* a 1 b a e) = (λ a . (λ b . e a) 1)
DO is an abbreviation too and can be used in conjunction with LET's to achieve same than
(DO (LET a 1) (LET b 2) e) = (λ a . (λ b . e 2) 1)
So I have three different shorthands to construct LC expressions. Now, my questions is that is this syntactic sugar throwing me out from pure LC (or functional programming in general sense) and am I introducing side effects by this syntax?
In a way it looks like it, but on the other hand these three shorthands are only abbreviations and they translate to Lambda Calculus expressions that are well defined and reducible as any LC expressions.