====== Let and where constructs ====== ===== Hard differences ===== ==== Inside expression ==== * let constructs are legal * example code: main = print (1 + (let i = 10 in 2 * i + 1)) * where constructs are ilegal * example code: main = print (1 + (2 * i + 1 where i = 10)) ==== Function that use functions ==== * where constructs are legal * example code: hasVowel [] = False hasVowel (x:xs) | x `elem` vowels = True | otherwise = False where vowels = "AEIOUaeiou" * let constructs are ilegal * example code: let vowels = "AEIOUaeiou" in hasVowel = ... ===== ✎ ===== ~~DISCUSSION~~