Fix param types for foldl method