  We prove that Fomin's generalization of Lindstr\"om's lemma for paths on
acyclic directed graphs to walks on general directed graphs also generalizes a
theorem of Stembridge in the same way. Moreover, we show that whenever a family
of operations satisfies a Lindstr\"om-type determinant relation, a related
family of operations satisfies a Stembridge-type Pfaffian relation. We give
example applications to Kenyon and Wilson's work on groves and to Talaska's
work on alternating flows.
