I understand simple foldr statements like
foldr (+) 0 [1,2,3]
However, I'm having trouble with more complicated foldr statements, namely ones that take 2 parameters in the function, and with / and - computations. Could anyone explain the steps that occur to get these answers?
foldr (\x y -> (x+y)*2) 2 [1,3] = 22
foldr (/) 2 [8,12,24,4] = 8.0
Thanks.