ulkb.util.foldl_infix#

foldl_infix(f, g, arg1, arg2, *args, **kwargs)[source]#

Left-fold variant used to apply infix operators.

For example:

foldl_infix(f, g, [1,2,3,4,5], **kwargs)

is equivalent to:

f(g(g(g(1, 2), 3), 4), 5, **kwargs)