~subsetpark/fugue

ref: 90368535a815784c89a0438c712c6ff018bd2dbf fugue/registry.janet -rw-r--r-- 214 bytes
90368535 — Zach Smith Minor refactor 1 year, 4 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
(def- proto-field-registry
  "Keep compile-time track of field definitions"
  @{})

(defn fields
  [sym]
  (get-in proto-field-registry [sym]))

(defn register
  [key value]
  (put proto-field-registry key value))