The statement that let is an expression is a bit like what seems to me; in the do block, this statement, although we say that there is the abbreviation let ... in . Fact that i think
let_in_ :: Statement -> Expression -> Expression _where_ :: Statement -> Statement -> Statement
Thus, the first part of a let is an operator and can be modified using where . For example,
foo n = (let a = b where b = True in (\x -> a)) 3 bip = do let a = b where b = let c = d where d = True in c return a
Similarly, we can say something like this:
case_of_ :: Expression -> [Statement] -> Expression
for example
zx = case even x of True -> d where d = x + 1 False -> w - 1 where w = let a = x in a + 1
source share