concept CellLoop in category functional programming

appears as: CellLoop
Functional Reactive Programming

This is an excerpt from Manning's book Functional Reactive Programming.

Java isn’t entirely on board with this way of thinking, so in Sodium we use a trick called CellLoop to get around it. Here’s the Sodium code:

CellLoop<Integer> value = new CellLoop<>();
Stream<Integer> sUpdate = sDelta.snapshot(value,
        (delta, value_) -> delta + value_
    );
value.loop(sUpdate.hold(0));

CellLoop is like an immutable variable that you assign once through its loop() method. But unlike a normal variable, you can reference it before it’s assigned.