
22 Dec
2020
22 Dec
'20
11 a.m.
Thanks, that's clearer now.
On Tue, Dec 22, 2020 at 12:55 AM Francesco Ariis
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 _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners