3 ms·
They are analogous if you represent side effects like this: new_state = f(old_state, x) then an idempotent operation is f(f(state, x), x) == f(state,
by blt 11y ago
They are analogous if you represent side effects like this:
new_state = f(old_state, x)
then an idempotent operation is
f(f(state, x), x) == f(state, x)
In the context of drawing windows:
draw(draw(fbuf, wnd, x, y), wnd, x, y) == draw(fbuf, wnd, x, y)
but this is of course false if you allow alpha channel transparency...