Re:Reconsidering Functional Programming
by Rusky on Monday May 04, 2015 @12:12AM
(#9484265)
Does pure functional programming somehow not have "let ... in ..."?
[ Parent
| on HN ]
Yeah, 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.