
14 Dec
2020
14 Dec
'20
8:29 p.m.
Il 14 dicembre 2020 alle 20:05 amindfv@mailbox.org ha scritto:
It's the same in do-blocks:
main :: IO () main = do let 3 = 2 + 2 putStrLn "Oh fiddlesticks"
What happens exactly when I type this? λ> "prova" = "foo" λ> 'c' = 'd' λ> 'c' 'c'
From the Report I read:
lexp → let decls in exp decls → { decl1 ; … ; decln } (n ≥ 0) ⁝ decl → (funlhs | pat) rhs ⁝ Am I correct in saying `pat rhs` is the rule being used here? I do not understand how/when it comes useful in a let —F