(foldr + 0 '(1 2 3 4))
returns 10 what i expect but
(foldr and false '(true true false))
gives an error
and: expected an open parenthesis before and, but found none
foldr accepts a function (which takes two parameters, since I have one list), and the base register, and list (s). I expect my second line of code will return true if the list has more than zero, and all of them are true, and thatβs how I thought it would work. But apparently not.
source share