2 ms·
Does pure functional programming somehow not have "let ... in ..."?
by Rusky 12y ago
Does pure functional programming somehow not have "let ... in ..."?
- bandrami 12y agoAs a compile-time macro of sorts, yes (early LISPs just had (labels(...)), for instance).
- ufo 12y agoYeah, I'm not really getting the single-assignment bit. That kind of thing makes me think about effect systems and linear types instead... In any case, let ... is basically syntactic sugar for lambdas. let x = a in b is equivalent to (\x -> b)(a) Other than aesthetics, the only reason to have a separate "let" syntax is to tell the typechecker that a function can be polymorphic.