The trick that makes GHC’s ApplicativeDo optimization faster is structurally identical to how biologists predict RNA folding.