diff --git a/u2/list_ops.py b/u2/list_ops.py index 5f19ccb..fe1b916 100644 --- a/u2/list_ops.py +++ b/u2/list_ops.py @@ -40,7 +40,7 @@ def foldl(function, list, initial): def foldr(function, list, initial): acc = initial for gns in list[::-1]: - acc = function(gns, acc) + acc = function(acc, gns) return acc def reverse(list):