Changed my mind about constraint functions again. They should be like this: (fn [action old-graph new-graph thing-changed] ...).