(defconstant +waiting+ 0)
(defconstant +claimed+ 1)
(defconstant +synced+ 2)
(defun flag-to-string (flag)
(case flag
(+waiting+ "WAITING")
(+claimed+ "CLAIMED")
(+synced+ "SYNCED")
(otherwise "unknown flag")))
; (flag-to-string +synced+) => "unknown flag"