
How it works
All the formulas in a Lucidchart document are evaluated as soon as their value is requested and one of the formulas dependencies have changed. This immediate invalidation of the dependency tree necessitates the detection of, and erroring upon, any cyclic dependency to prevent infinite loops. Meaning, at first, there doesnât seem to be a good way to store a previously calculated value in memory and then use that stored value in the next calculation. In spite of that, there are a few built-in functions in Lucidchart that make it possible. The two branches of anIF function are lazily evaluated. So A can depend on B and B can depend on Aâif they donât depend on each other at the same time.
For example, if the formula for A was @B and the formula for B was @A, it would result in an error because of the direct circular dependency.


A were IF(true, @B, 5) and B was IF(false, @A, 20), then there would be no circular dependency. This isnât very useful on its own, but it is a stepping stone to simulating a flip-flop.



CURRENTSECOND function. With the CURRENTSECOND function and the ISODD or ISEVEN functions, we can simulate a two-second clock cycle (an astounding .5 hz!)âan even second for the first phase of the cycle and an odd second for the second phase of the cycle.


LASTCALCULATEDVALUE built-in function. This function made what was once accidentally Turing complete officially Turing complete.


