Haskell: foldl' accumulator parameter
I've been asking a few questions about strictness, but I think I've missed the mark before. Hopefully this is more precise.

Lets say we have:

    n = 1000000
    f z = foldl' (\(x1, x2) y -> (x1 + y, y - x2)) z [1..n]

Without changing `f`, what should I set

    z = ...

So that `f z` does not overflow the stack? (i.e. runs in constant space regardless of the size of n)

Haskell: foldl' accumulator parameter
===

I've been asking a few questions about strictness, but I think I've missed the mark before. Hopefully this is more precise.

Lets say we have:

    n = 1000000
    f z = foldl' (\(x1, x2) y -> (x1 + y, y - x2)) z [1..n]

Without changing `f`, what should I set

    z = ...

So that `f z` does not overflow the stack? (i.e. runs in constant space regardless of the size of n)
