init.esl 288 B

123456789
  1. (lambda (device)
  2. (var state (/state/devices))
  3. (= (get state device) (/lib/observ/Obj))
  4. (/state/devices/set state)
  5. (var update (.bind ./update null device))
  6. (.done (/api (+ device "/list") update)
  7. update
  8. (/lib/error (+ "could not subscribe to " device " device list"))))