The author is confused, their Prolog implementation is clearly a left fold!
I'm only half joking :)
To elaborate: The variable names "ACC" and "RES" suggest the predicate should be viewed as a left fold, because when the predicate is viewed as a right fold the meanings of the variables are flipped.