
22 Dec
2020
22 Dec
'20
1:54 a.m.
Hello Lawrence, Il 21 dicembre 2020 alle 23:59 Lawrence Bottorff ha scritto:
addThree :: (Num a) => a -> a -> a -> a addThree = \x -> \y -> \z -> x + y + z […]
But how is the beta reduction happening with addThree?
Should be: addThree = (\x -> \y -> \z -> x + y + z) 1 2 3 = (\y -> \z -> 1 + y + z) 2 3 beta = (\z -> 1 + 2 + z) 3 beta = 1 + 2 + 3 beta = … Does that make sense? —F